@fsa317 wrote:
Working on a template for detecting what is on my roku device. I have a larger template but boiled down my issue to the following.
The two lines below should who the source and then use is_state_attr to check the source.
{{ state_attr("media_player.bedroom","source") }} {{ is_state_attr("media_player.bedroom","source",'Roku') }}
The output when the source is Roku, as expected is:
Roku True
However, I turn on the Roku and my cable box and it fails:
{{ state_attr("media_player.bedroom","source") }} {{ is_state_attr("media_player.bedroom","source",'Cable box') }}
returns
Cable box False
For some reason the comparison to the word Cable box seems to fail.
Posts: 6
Participants: 2