Is there any way to have Home Assistant monitor if a show has been paused? We just bought a new OLED, and my mom likes to leave the TV paused for hours at a time. Is there any way to see if the show is paused so I can turn the TV off?
It should be possible with the integration:
And how would I do that?
Thank you, @eric, for posting about this integration.
@HarperIsCrazy, this will create a media_player instance in Home Assistant that will be connected to a specific Channels client.
Make sure to give the IP address of the device that you want to check.
Also, since this integration depends on the IP address, you will want to make sure that the device has a static address.
Once you have created the media_player instance in Home Assistant, you can use an automation like this:
alias: "Check Media Player Pause State with Delay"
trigger:
- platform: state
entity_id: media_player.living_room
to: 'paused'
for: "00:10:00" # The media player must be paused for 10 minutes
condition: []
action:
- service: notify.notify
data:
message: "The media player has been paused for 10 minutes."
This is something I got by using ChatGPT. Not tested.
It works! Thank you for your help
Would you be able to make one that sends what's being watched when it's paused? Thanks!
That's cool.
Where exactly would you like to see the name of the program that was being watched when it was paused? In the notification message?
If so, this should work:
alias: "Check Media Player Pause State with Program Name"
trigger:
- platform: state
entity_id: media_player.living_room
to: 'paused'
for: "00:10:00" # The media player must be paused for 10 minutes
condition: []
action:
- service: notify.notify
data_template:
message: >
The media player has been paused for 10 minutes.
Program: {{ state_attr('media_player.living_room', 'media_title') }}