Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 111389

Change output in automation

$
0
0

New user, still working to get my head around all the terminology. I’ve successfully set up a sensor to monitor the status of my garage door, and an automation to monitor that status and report any change to a remote system.

My problem is the door status is “open” and “closed”, but my remote system needs “on” and “off”. I have tried multiple permutations of IF / ELSE in different places in this code and nothing has worked, most times the automation fails to run.

Any help is greatly appreciated.

sensor:
      platform: mqtt
      name: "Garage Door"
      state_topic: "garadget/Garage/status"
      value_template: "{{ value_json.status }}"

automation:
  - alias: "garage_door_status"
    trigger:
      platform: state
      entity_id: sensor.garage_door
    action:
      service: shell_command.send_to_x

shell_command:
    send_to_x: 'curl http://10.1.1.5/garage/{{ states("sensor.garage_door") }}'

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 111389

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>