This is an automated archive made by the Lemmit Bot.
The original was posted on /r/homeassistant by /u/UnnecessarilySmooth on 2025-03-09 21:48:37+00:00.
If you are also a parent, you may well have found yourself in the situation where you tell your kid that ”this is the last episode”. You then proceed to do your adult stuff, miss that the episode has ended and the next one automatically started. Now you’re in the horrible position of either wreaking havoc and stopping the episode mid-episode (toddlers are the best aren’t they), or let your words mean nothing and let them watch another episode anyway.
If you relate to the above, keep reading! I have for a long time found that it would be awesome if the Apple TV could stop/turn off when the episode my kid is looking at ends. A kind of temporary ”auto-play off” button while I’m busy being an adult and can’t manually watch and stop the TV. Googled this and was only able to find other threads of other parents with similar ideas but no execution, let alone instructions for adding this to Home Assistant.
Full disclosure: I’m in no way a programmer, and have only been trying out Home Assistant for just over a week. Therefore -silly enough- proud of myself to have anyhow been able to figure out a way to get this working, and equally impressed with how easy Home Assistant made this for me.
Let’s also be honest that this is absolutely not perfect, but hey, it works for me, and hopefully better than nothing also for you who finds this thread. Here’s hoping someone who knows what they’re doing also finds this thread and comments a more beautiful workflow for this!
Right, enough back-story, let’s get going:
- First of all, let’s make the button for you to press to activate this function.
Settings>Devices&Services>Helpers> + Create Helper
Here, select Toggle, give it a proper name such as ”Last Episode” and an icon you like for it.
- Now the bigger workload: we make the automation.
Settings>Automations&Scenes>Create Automation
Create new automation.
When section,
Add trigger. Select Entity>State, and find your Apple TV in the Entity window. Make sure it’s the one starting with ”media_player.” In the ”From (optional)” window, select ”Playing”. In the ”To (optional)” window, select ”Any state (ignoring attribute changes)”.
And if section,
Add trigger. Select Entity>State, and find the toggle you made in step 1. It should start with ”input_boolean.” In the ”State” window, select ”On”.
Then do section,
Add action, search for the ”Media Player: Turn Off” action (if you prefer the program is paused rather than AppleTV turning of, select the ”Media Player: Pause” action.). Click the green ”+ Choose Entity” button, and select again the ”media_player.” Apple TV entity.
Recommended optional is to add also in the ”Then do” section a second Action for ”Input Boolean: Turn Off”, and in the green ”+ Choose Entity” button, add your toggle we made in step 1. This turns the function off after having been run once, so you can avoid looks that could kill from your non-tech savvy partner.
- Go to your Dashboard, select Edit Dashboard and add the ”input_boolean.” Entity we made in step 1 to your preferred place in your Dashboard. Mine’s just under my Apple TV card.
- Try it out!
The drawback of this method is that the Apple TV turns off whatever you do. Pause, exit app, whatever. The TV will turn off. I have so far been unsuccessful selecting any other state than ”Any state” that makes this work as intended. Anyway, for me, I prefer this to nothing and find good use for it already. Also been able to add these as Scenes in my Control Center on my iPhone, so can quickly toggle also outside the Home Assistant app.