Ok, so maybe I’m blind, or misunderstanding something, but I’m having an issue with a history_stats sensor. Maybe someone can help.
I’m trying to break out the hvac_action attribute of the hive system, so I can then create an automation to track if the heating has been on in the last 12 hours. This is to aid me in the mornings, when I’m a zombie, to know if I should use the electric shower, or if there’s sufficient hot water. (Note, when heating is active, the system also heats my water.) The automation will cause my bathroom light to change colour or flash, when there’s hot water, so I don’t need to think, or check my phone. Remember, I’m a zombie in the morning!
The attributes I need are part of climate.upstairs, and climate.downstairs, and I’ve managed to break these out into their own sensors.
I was originally looking at a binary sensor, but it’s always possible that the heating might be on for 5 minutes or less, which not heat enough water for a shower. So instead I wanted to output how long it was active for and then create an automation that would do something if the heating was on for more than a half hour. (flash a bulb, change colour, or something like that.)
All in configuration.yaml.
It’s got me baffled, as I don’t see why one works and the other doesn’t. The code is identical for both, with the exception of the specific sensors, and they’re pulling from the one system (hive).
I might just have had a light bulb moment.
I think I need a restart. I made a change to the upstairs sensor after the sensor was created. (I had “heat” instead of “heating” as the state.) but I don’t remember if I restarted HA after I made the final change …