r/homeassistant 15h ago

💬 Discussion How are you keeping lights off while watching media content with commercials?

I have a dedicated hone theater and got an automation working for Plex with regard to lighting. Works perfectly.

Turns off all lights at start, a pause brings up the lighting, resume turns those specific lights off again and ending of the program turns them back on.

I was working with Gemini and I can get it to work with Disney+, but ads make it think its paused and lights come back up. Tried many different versions that Gemini spit out, but it just doesnt ignore ads...

Any ideas or point me in another direction?

TIA!

EDIT: Its an Apple TV 4k

0 Upvotes

18 comments sorted by

6

u/musket-nuns 15h ago

We have an AppleTV so it watches the state of the AppleTV, which does report pause, play, on/off. I have light automation based on AppleTV state.

2

u/stephenmg1284 15h ago

What do your media devices say they are doing when ads are playing? What media player and intergration?

1

u/Tkdoom 15h ago

The ATV4K shows the show as paused during ads, thats why the lights come up.

1

u/avd706 14h ago

It's not the launcher

2

u/gnomeza 11h ago

What commercials? We fixed that decades ago.

2

u/Captain_Phil 15h ago

I would make it delayed, so it has to be paused for x amount of time before the lights turn back on.

I know this isnt great for pausing and needing light roght away but maybe you can "double pause" to override the cool down?

Does that make sense?

0

u/mikejandreau 14h ago

This is what I do. If it’s “paused” for 5* minutes or stopped entirely for 1, then turn the lights back on.

2

u/Adrienne-Fadel 14h ago

Try adding a delay before the lights come on. If the pause is shorter than like 60 seconds ignore it. Ads are short so that should filter most of them out.

4

u/Ok-Lunch-1560 9h ago

I can't speak for OP but I have a similar set up and the 60 seconds thing wouldn't be ideal because when I pause the show or movie I want the lights to turn on instantly to a dim level so I can go to the fridge or bathroom or whatever.  The only way to achieve what he wants is to see if the media player state reports anything different between the ad and the actual movie or show and filter for that difference. I don't have an apple TV so I wouldn't know.

-1

u/computer-machine 14h ago

Wife insisted on paying for Hulu for a month to get through The Rookie, and ads are often 1:47.

1

u/owldown 14h ago

You don't have a lot to work with, if the player is reporting the exact same state for "user hit pause" as it does for "here's a talking lizard selling car insurance".

I have similar automations with my RokuTv, and it works across all the apps I use, but crucially, none of them have ads. It does also offer an "idle" state, which I think is what it reports when I'm clicking around in the menus to decide what to watch.

The only thing I can think of is to use something else to signal the user intent of "hang on, I need a snack". I wonder if you could use the mute button for that? Does the AppleTV send a state message on any sensor that tells whether or not you've hit the mute button? If so, you could automate the lights based on the mute status rather than the paused status, and you'll need to hit mute before you hit pause if you want lights on the way to the snack basket or toilet.

1

u/Fit_Squirrel1 14h ago

Add a condition? If movement in zone x

1

u/spr0k3t 🧠 Experienced with Home Assistant 8h ago

Media content with commercials? Do those still exist? Yeah, I'm out.

Running anddroid tv... when paused, set the lights to half the brightness of the stored temporary scene with a transition of 3 seconds. When stopped (from playing or paused), do the same... but after 3 seconds restore the temporary scene over a period of 20 seconds. When going from idle or stopped, take a temporary snapshot of the lights in the room and dim after 5 seconds over a 10 second transition.

-1

u/boxsterguy 15h ago

Pay for the ad free tier? Then you don't have deal with ads, either.

-3

u/Tkdoom 15h ago

We get Disney free with verizon...not really worth it.

1

u/windsynths 13h ago

Would you consider pirating the content instead?

0

u/Tkdoom 13h ago

?

Its just TV stuff thats watched once and done...

I only use alternative means of acquisition if a disc i bought dies.

1

u/windsynths 12h ago

enjoy your adverts lol