Hi all very new to home assistant and just started to get my head around in what can actually be done, but i am stuck on a particular bug, i have set a [ Trigger } timer to run periodically every 15 minutes to turn screen off and [ Action ] to complete it but i am stuck now and tried for days to figure it out and its beaten me, i am trying to get the AND, OR, IF to recognise that if tv state is on a particular channel i.e music in my case channel 728 that it turns screen of but i cant find a way around this to TRIGGER ( TIMER ), CONFIRM (TV IS ON CHANNEL 728 ) and run ACTION ( SCREEN OFF) .
Thanks if you can help me figure this out…
alias: 15 Minute Periodic Timer To Check Channel 728 Is On TV To Turn Screen OFF
description: “”
trigger:
platform: time_pattern
minutes: “15”
condition:
condition: state
entity_id: media_player.lg_webos_tv_up75006lf
state: “on”
action:
service: webostv.command
metadata: {}
data:
entity_id: media_player.lg_webos_tv_up75006lf
command: com.webos.service.tvpower/power/turnOffScreen
mode: single
the trigger will depend on what the status is of your tv. put your tv on the channel you want. go to your dev-tools → states page, find your tv there… grab the info and paste it here. find the one that has the attributes on the right that specifies the channel info and everything. if it contains the exact channel info, then you can trigger off of it. warning that it’s possilbe it doesn’t give you the right info to trigger on tho…
one thing that also helps is then to switch it to another channel and take another snapshot so that you can see what changed, which helps you figure out what to trigger on.
The attribute named Source tells you what source the current picture is coming from.
The attribute media_title tells you info about that source. On the Live TV source it is usually the channel name, which should be the one you could use.