Hi all, very newbie with HA,
Trying to automate some switches when it’s manually turn off, code in
configuration.yalm
sensor:- platform: command_line
name: candeiro_sala_sensor
command: "curl http://192.168.0.50:10050/json?tasknr=1"
value_template: '{{value_json.liga}}'
scan_interval: 60
switches.yalm
- platform: template
switches:
candsala_templated:
value_template: "{{ is_state('binary_sensor.candeiro_sala_sensor', '1.0') }}"
turn_on:
service: switch.turn_on
data:
entity_id: switch.candeiro_sala
turn_off:
service: switch.turn_off
data:
entity_id: switch.candeiro_sala
but the state never change, sensor display the correct value 1.0.