I’m trying to develop an automation that triggers a different scene when I change the activity on my Logitech Harmony remote. I’ve tried a couple of different methods but none of them seem to trigger the event:
Method #1
alias: Media Room Watch Television Scene
trigger:
platform: state
entity_id: remote.media_room
condition:
condition: template
value_template: ‘{{ trigger.to_state.attributes.current_activity == “Televison” }}’
action:
service: homeassistant.turn_on
entity_id: scene.media_room_scene_1
alias: Media Room Watch Television Scene
trigger:
platform: state
entity_id: sensor.media_room_activity
state: ‘Television’
action:
service: homeassistant.turn_on
entity_id: scene.media_room_scene_1
** Method 3**
alias: Media Room Watch TV
trigger:
platform: template
value_template: “{% if is_state(‘remote.media_room.attributes.current_activity’, ‘Televison’) %}true{% endif %}”
action:
service: homeassistant.turn_on
entity_id: scene.media_room_scene_1
I’ve achieved exactly the same effect but using emulated_hue to trigger the scene and then including that as part of the activity on the harmony…much simpler
I use this automation to switch the ambilight ON or OFF when activity PLEX starts or ends. sensor.harmony is a template sensor that I have in the frontend to check current activity. It’s not necessary, but I like to see it
So the method describe in this thread is working for me, however it is taking too long to trigger the scenes. I think the HA harmony component is polling the harmony hub on a set basis to determine the state.
It sounds like the emulated_hue method described by @Bobby_Nobble would be much faster because the harmony hub would trigger the scene immediately. Is there any other method out there to improve the time it takes to trigger the scenes? I’d like to avoid putting any logic into my harmony hub as the interface is so poor, but I will go down the emulated hue path if there is no alternative.
I now have HA set up to use the multiple emulated_hue custom component which lets me set it so the Harmony hub only sees the ‘lights’ I want it too rather than everything I’ve set up for Alexa, makes life much easier in the Harmony app.
I added the emulated_hue component, and have the harmony remote triggering my different scenes when the remote activities change. It is very fast/responsive so I’m much happier with this approach. Only downside is the configuration defining what scene is triggered is stored in harmony and not within the HA config, but I can live with that.