Automation ideas to dim lights when I press play on Harmony remote?

Hi I’m trying to find a way via Home Assistant to recognize when I press play (Netflix etc) on my Roku device via the Harmony elite, it will dim the Lutron lights in my movie room. Also to ramp them up a bit when I press pause or stop.

I’ve looked through the forum but have been unable to find a solution. I’ve haven’t any trouble dimming the lights through Harmony for the general Activity selection, but I would like it to be a bit more precise than that.

I’ve attempted adding an automation in HA that would respond to Roku entering the play status, and it doesn’t appear to work. I welcome any ideas that I may be overlooking.


alias: Lights off when starting movie
description: ''
trigger:
  - platform: device
    device_id: 90********************8
    domain: media_player
    entity_id: media_player.roku_express_4k
    type: playing
condition:
  - condition: state
    entity_id: light.media_room_front_sconces
    state: 'on'
action:
  - service: light.turn_off
    data:
      transition: 10
    target:
      entity_id:
        - light.media_room_front_sconces
        - light.media_room_rear_sconces
mode: single

trigger:
  - platform: device
    device_id: 90********************8
    domain: media_player
    entity_id: media_player.roku_express_4k
    type: playing

If it’s an entity in the developer tools then you should be able to use state trigger.
Perhaps that works better?

2 Likes

I think @Hellis81 has you down the right track, and if you also still need to capture harmony button presses see this:

You could add Emulated Roku - Home Assistant to your activity. This is a dummy device which allows HA to read button presses from Harmony. You can specify sequences to the play button (or other buttons on your remote) which include the normal playing-action and an action for the emulated-Roku in the settings of the harmony app. Than you could trigger an automation when emulated-roku sends a signal to HA.

Thanks, I can execute it via run automation, and it works, but it doesn’t seem to transfer over to actual use. It appears I only have either an on or standby state for the Roku. I’m not sure if the Roku has a playing, pause or stop state.

I don’t know if it has playing state. You should be able to look at it.
Just open the developer tools and have a look.

If you’re using the Harmony Elite, why not take advantage of the Home Control buttons? On mine, I have a button mapped for my Movie Night scene. You can use a short press to turn it on, and a long press to turn it off. Someone else mentioned Emulated Roku. One issue with Roku is that it is only active while you are in the activity. With the Home Control buttons and Emulated Hue, you can use them at any time.