Nodered + Home Assistant activate scene with specific application

Hi all!

I'm trying to get my lights in the living room to dim when watching movies/series. I've a scene made in Home Assistant to dim the proper lights.

So I'm watching on a Nvidia Shield and it is connected to my HA so it can read if it is on/off or playing/paused but also which application is started.

For this I would like to filter out some apps I don't want my lights to dim when started, like Youtube.

Does somebody have any idea how I would do that in Node-Red, which Node I should use and what JSON Data to use?

Many thanks!

Darryl

I don't use HA but if you can share the activated app plus the shield status to Node-Red you can then use switch nodes in parallel to activate the flow when the shield is turned on and playing. Then use a switch node to filter to the aps that you want to dim the lights for. Finally attach those outputs to a change node to set your dim level and send that back to HA to dim your lights.

Well, that's the thing, in node-red I can only see if the Shield is playing/paused/off as far as I know. But in HA I can see also what App is running but I don't know how I can see this in node-red.

Can you push the app playing to an MQTT broker as another way to transfer it to Node-Red? Otherwise maybe another node that you can push through a variable value of the app running

How do you link your Nvidia Shield to HA ?

As a Google Cast device.

I've to look into this, thanks for pointing it out!

NP. I switched from dedicated hub nodes to MQTT and never looked back-back. Made it super easy when I switched from OpenHab to Homeseer and allowed me to integrate in some other independent components.

I see, but I'm not planning to switch platform any time soon so more looking for a permanent solution.

Sorry, that was just an extra benefit. It's more that by using a neutral approach it's easy to integrate in other pieces as needed and gives you more flexibility