Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106627

Trigger a script every half hour if a state remains unchanged

$
0
0

I have written a couple of scripts that send a complex sequence of IR signals from my blaster to an old dumb tv. The reason I need them is twofold

  1. When the TV is switched from its Chromecast input to the PC input, I have to switch the screen size to “Screen FIt” in order to see the edges of the PC’s video signal. The first of these scripts is triggered so that I don’t have to reach for the TV’s remote and bash out 15 (!) button presses

  2. Every 30 minutes thereafter, the TV switches automatically to 16x9, necessitating the need for the same script to trigger

The second script is triggered when the TV inputs switches back to the Chromecast where a 16x9 aspect ratio is far less problematic.

The yaml for automation I’m currently using to fudge the issue can be found here

The scripts I’m using to switch between screen sizes are both working great but the automation to trigger when I’m using the PC is a bit clunky as it cuts out after four half hour repeats. Obviously, I want it to repeat the relevant script every half hour but only so long as the TV input doesn’t change.

Is there a more elegant and long-lasting way to ensure the script triggers when needed? Manual triggering interrupts what I’m doing and I’m thoroughly sick of having to do that…

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106627

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>