I want to write an automation that is triggered when I leave the TV on for more than 10 minutes whilst nothing is playing on chromecast (i.e. i forgot to turn the TV off).
Im having some issues getting the trigger right. The value_template
evaluates correctly, however, how do I apply the time restriction? the template
trigger platform does not support the commented for
config.
- alias: TV On Notification
trigger:
platform: template
value_template: "{{ is_state('media_player.tv', 'playing') == false and is_state('binary_sensor.tv_on','true','on')}}"
# for:
# minutes: 10
action:
- service: notify.pushbullet
data:
message: "You left the TV on."
Any help and ideas would be appreciated. Thanks very much