I am playing around with using a timer to measure how long my furnace has run since last I changed the air filter. My current system is a counter which I decrement every day at a set time. This works, but not all days are equal in furnace run time. In a few days time I’ll have home level power monitoring (emporia vue 2 flashed with ESPHome is the plan, awaiting delivery on Thursday).
My thinking is to use a threshold helper to determine if the furnace is running or not (should be easy enough given the power draw of the fan vs idle must fairly obvious). The next step is where I’m struggling, I have a similar threshold sensor setup on my dumb tv to determine if it is on or not so I can smartly control said tv with an IR blaster.
I setup a dummy automation to test a few things and it doesn’t appear to work very well. Sometimes the notification is triggered when the TV is turned off. Is there a better way to use a timer helper to trigger an automation than as I have below? Or perhaps a better approach I haven’t considered? See below for the YAML of my test automation (timer is setup to run for 1 minute for testing purposes only of course).
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.living_room_tv_power_state
to: "on"
id: TV_ON
- platform: state
entity_id:
- binary_sensor.living_room_tv_power_state
to: "off"
id: TV_OFF
- platform: state
entity_id:
- timer.test_tv_timer
to: idle
from: active
id: Timer_concluded
enabled: true
condition: []
action:
- if:
- condition: trigger
id: TV_ON
then:
- service: timer.start
data: {}
target:
entity_id: timer.test_tv_timer
- if:
- condition: trigger
id: TV_OFF
then:
- service: timer.pause
data: {}
target:
entity_id: timer.test_tv_timer
- if:
- condition: trigger
id: Timer_concluded
then:
- service: notify.mobile_app_phone
data:
message: Test TV timer finished
mode: single
alias: Test TV timer