The automation triggers when the state of the sensor.tv_on_today goes above 2 (hours).
I would like to be able to push a button (don’t need help with this part) that would increase the 2 hours by 30 minute increments. The two hours is currently the To value from the Trigger State. Is there a way to setup a variable that can be manipulated up or down?
alias: Turn TV Off After 2 Hours of Consumption
description: ''
trigger:
- platform: state
entity_id: sensor.tv_on_today
to: '2.0'
condition:
- condition: time
after: '06:00:00'
before: '20:00:00'
action:
- service: notify.alexa_media_dining_room_echo_dot
data:
message: Daily Television limit reached! Powering off now. Time to go play!
data:
type: tts
- service: switch.turn_off
target:
device_id: e75899b9b7154a858c2586eb5b41g145
mode: single