I an having some challenges parsing the response from HASS.io. I would like to turn my television off if the roku is idle for 30mins. Kids forget to turn the TV off.
Which is what I expect. It converted the xml in json. What I would like is to be able to extract the @state. When it is close or idle for 30 mins, i would automate the turn off of the TV. However when I use the following value template, all i get is ānoneā no matter what the actual state is
The problem with the integration is that is will show as āplayingā whether it is on the roku splash screen, or on the netflex top menu page. What I am hoping to get is if the player is not actively stream a show/movie and idle, shut the TV off. The /query/media-player returns different āstatesā when the show if play or notā¦
Not sure what type of roku you have but for mine if it gets left on long enough in an app menu for the applicationās screensaver to appear then the media_player's state switches from playing to idle. Does this not happen for you?
Not sure if it is the version of the Roku, but mine will stay on play whether it is on the top roku menu , in the stream service menu (ie: netflix or crave etc.) The only way I can tell if it is actually playing is by querying the player with the http://192.168.x.x:8060/query/media-player
if interested this is the output of the device info.:
Hm yea it definitely seems like something odd is happening for you. For mine, when Iām in the top Roku menu the state of the media_player is Home not Playing. When I launch any application then the state becomes Playing even if Iām just in the application menu, not watching anything. But if I leave it in an application menu long enough for that applicationās screensaver to appear then the state switches from Playing to Idle.
Iād recommend submitting a github issue since it sounds like youāre not seeing either of those behaviors. Might be an issue with how the integration handles your roku model that warrants further investigation.