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") }}'