Dynamic number variable on dashboard

So I’m using counter configuration to turn off the tv close and close the shutter in the evening after watching a couple of episodes of the actual sitcom before sleeping.
The counter increase logic is pretty basic, if Apple TV state is “playing” for 16 minutes, it gets increased by 1.
If counter reaches 3, then I want the automation to shut down at the end of the episode, so from “idle” to “playing” state does the job. This is the final trigger of the night.
Also I’m seeking for solutions to have a more dynamic variable I can define any time, whenever I want to watch 4 or 6 episodes in a night.
Preferable way would be to display it in the dashboard, so I can change it any time.

Until I find a better solution, I’ve made this:

  • New inputboolean: Bedroom TV can turn off
  • 3 new inputbooleans: 3,6,9 episodes to be played
  • automations to monitor which “…episodes to be played” boolean is ‘On’, and if counter reaches that number, “Bedroom TV can turn off” boolean becomes ‘On’
  • Automations doing the good night routine now check the “Bedroom TV can turn off” condition instead of counter which had a fix value of 3. Also the “…episodes to be played” booleans are turned ‘Off’, and “3 episodes to be played” gets turned ‘On’ as a default.

Instead of an input Boolean, create a helper…Dropdown with the episodes. Then use the active state of the inputselect to control your automation.


Or just an input number and you can set it to any number of episodes

1 Like

Damn, would save half an hour of time wasted, if I’ve known this helper. Thx!

Ironically it’s in the same place as the input booleans you created.
But I guess you didn’t know that input number is.