Hi,
on first boot, i always have the eror below
Received invalid switch is_on state: unknown. Expected: on, off, true, false
its normal, since the state of my switch is only known after the the harmony is connected
how can i improve this?
- platform: template
switches:
tv:
value_template: "{{ states.sensor.harmony_state_tv.state }}"
turn_on:
- service: script.harmony_watch_tv_google
- service: shell_command.harmony_state
data_template:
power: "on"
name: "TV"
icon: "mdi:power"
api: "switch.tv"
turn_off:
- service: script.harmony_turn_off
- service: shell_command.harmony_state
data_template:
power: "off"
name: "TV"
icon: "mdi:power"
api: "switch.tv"