david1
(David)
1
I am trying to follow this guide for harmony sensors
where do i put in my activity?
EXAMPLES
Template sensors can be utilized to display current activity in the frontend.
sensor:
- platform: template
sensors:
family_room:
value_template: '{{ states.remote.family_room.attributes.current_activity }}'
friendly_name: 'Family Room'
bedroom:
value_template: '{{ states.remote.bedroom.attributes.current_activity }}'
friendly_name: 'bedroom'
petro
(Petro)
2
What do you mean? Are you trying to create a user interface that allows you to change the activity?
david1
(David)
3
for the most part yes, I prefer to use a switch so I can sync it with alexa
petro
(Petro)
4
Take a look at the activity template switches I use in this post:
1 Like
Cezex
5
So why not to use switch instead of sensor?
- platform: template
switches:
harmony_tv:
friendly_name: 'TV'
value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'TV') }}"
turn_on:
service: remote.turn_on
entity_id: remote.harmony_hub
data:
activity: TV
turn_off:
service: remote.turn_off
entity_id: remote.harmony_hub
icon_template: mdi:television-classic
petro
(Petro)
6
That’s what the link shows.