I have created the following switch template:
- platform: template
switches:
watchtv:
friendly_name: Watch Tv
value_template: "{{is_state_attr('remote.upstairs', 'current_activity', 'Watch Tv')}}"
turn_on:
service: remote.turn_on
entity_id: remote.upstairs
data:
activity: "34966859"
turn_off:
service: remote.turn_off
entity_id: remote.upstairs
data:
activity: "-1"
While this will turn on the desired activity, the switch will then immediately goes to an off state.
Any suggestions on how to make this behave like a normal switch?
I also setup a input_boolean with scripts and automation, however I cannot get those to work with alexa so I thought I would give this switch a try.
Thanks in advance for any suggestions.