Hello i have a problem with my automation before it was working fine but now it doesn’t work anymore.
I have a nintendo switch console connected to a sonoff basic switch. The automation to turn it on works fine, unfortunately when i change or turn off the activity it won’t follow and turn off the switch.
I’m pretty sure before it was working, i don’t understand. Here is my automation:
- alias: '[Switch] PowerOff SWITCH TV et Sonoff3'
initial_state: on
trigger:
- platform: state
entity_id: remote.harmony_hub
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.harmony_hub
state: 'SWITCH TV'
- condition: or
conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "APPLE TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "ONE TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "PS4 TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "SMART TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "PC TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "360 TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "RETRO TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "MOVIES TV" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "ONE" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "MOVIES" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "PS4" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "CHROMECAST" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "PC" }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "RETRO" }}'
action:
- service: switch.turn_off
entity_id: switch.sonoff3
Thanks.