A blueprint for dimming the lights when a movie or TV-show on Plex starts - and turn back on when paused or stopped.
This is developed for use with Tautulli add-on but it is really just an mqtt listener so in theory, it can be used with anything.
Parameters are configurable - brightness on each state and mqtt topic to listen for.
The automation will only run after sunset so the light won’t be affected unnecessarily.
Attention
The payload of the mqtt packet must contain the key “body” which has the value of one of the following states:
{"body": state}
Where state can be one of the following:
resumed
paused
stopped
started
This is very easy to configure in Tautulli by setting the “text” notification in the control panel of Tautulli and setting the “Message body”.
Tested and working with a Philips Hue Cher lamp (works with other bulbs too) connected through zigbee2mqtt. But any lamp can be connected from the drop down menu on configuration
Perhaps I could be more clear, but your payload must contain the key “body” and the value must be one of the listed.
When starting the movie and you want the light to fade, you would send this payload:
{ "topic": "tautulli", "body": "started" }
But I can edit the post so it is more clear. Thank you.
You can take a step further and create sensors based on users and devices to take action in certain areas. Example body {user} ({player}) started playing {title}. This way i know my son Cole Cole RokuTV started playing Teen Titans Go!. Then i can control lights or another example is alert a google home when he watches something he shouldn’t.
Thanks for your suggestion! I will look into implementing this feature soon
If you want a notification for your son watching a movie, then you would set the “condition” in Tautulli to seperate your son and yourself or devices. Then you can set different topics. Your son (based on account or device) could be “tautulli_son” and yourself could be “tautulli_living_room” or whatever. See the picture below.
But I could look into making this blueprint action based. I have had trouble making the lights fade to a certain brightness when using actions, but the way this script is written, makes the fading work … I will see what I can do.
Thanks for this! I wonder if it’s possible to select a whole room? For example the living room. I have about 20 zigbee bulbs in my ceiling in the living room and would like to set them to the same state when playing/pause/resuming etc. Am i supposed to make a automation for each bulb? I can’t select multiple lights?
If I recall it right, you can include/exclude devices from the trigger in Tautulli. Please try this. I don’t think it is possible to obtain this information for use in Home Assistant and handle it that way.
Fantastic blueprint! I just tried it and got it working almost perfectly within 15 minutes. One feature request if possible: I love that we can set the brightness of the bulb at each state, but would it be possible to also set the colour of the bulbs? For example, a deep red during playback, warm white on pause and bright white upon stopping? Is that something I can easily add to the yaml?
Hi. Thanks for reaching out. Unfortunately, I don’t have any color bulbs to test this with. It should be possible to implement this feature, so if you have the time and want, please make a fork, and I will happily merge the changes into this blueprint
@Captain_Slow Im new to blueprints. Most of my lights show up as entities rather than device type “Light”.
How can I modify this to work with all entities instead of “lights” specifically?
For anyone else, I had a hard time getting this to work for whatever reason even though I could see the MQTT payloads coming through in MQTT Explorer.
I ended up creating an automation that does the same thing. I can’t figure out where the blueprint is causing the issue. I think it might be the payload condition statement. My payload comes from tautulli as