Device WAS in State, Now this state

Hi, I’ve been playing with HA for a few days now and have some basic automations in place. My goal is to advance my automation skills. But I need to get over some hurdles.

Right now, When I pause the TV, the hue sync box stops syncing and lights will return to full brightness However, I need to then make sure that Hue Sync starts again when the TV in not paused. Trouble is, I don’t always have the Hue Sync box playing. So I don’t want sync to start unless the TV was paused when Sync was already running before I paused the TV.

So the logic would be:

IF LivingRoomTV is Paused AND HueSyncBox is Started THEN stop HueSyncBox.
IF LivingRoomTV is Playing AND HueSyncBox WAS Stopped within the last 5 minutes THEN Start HueSyncBox

In theory, When I manually start HueSync and then Pause the TV, Hue Sync would stop untill I play the TV within 5 minutes of pausing it. Otherwise Sync will stay off.

My issue is not with Logic, it’s with figuring out how to configure an automation to do this.

If anyone could help me figure this out or point me in the right direction, Once I’m over this hurdle, I’ll probably level up!

Thanks

IF LivingRoomTV is Paused AND HueSyncBox is Started THEN stop HueSyncBox.

You could additionally set an input_boolean helper in this automation that indicates something like huesync_paused.

In your 2nd automation you could check and reset the helper.

An additional 3rd automation could reset the helper after it was enabled for 5 minutes.

1 Like

Excellent! Thank You. Didn’t really know what Helpers were but they are essentially Global Variables with advanced functions. My Automation is working perfectly! I wonder how one keeps these automations grouped? Fairly easy to lost in a long list of automations. Would be great to be able to group a load of automations into one subfolder for better organisation.

Glad to hear your problem is fixed.

Regarding grouping there is this topic.