#History stats : what do I put in state ?

1 messages · Page 1 of 1 (latest)

karmic topaz
#

This is supposed to tell me how much time the water heater stayed on during the last 24h, if I'm not wrong. Hwoever I have no idea of how to put a condition in State so that it only takes the time where the power was above 200W.

mild whale
#

history stats does not have the ability to track numerical values above or below a threshold

karmic topaz
#

That's disappointing. They should have made the field able to be a template at least. Oh well.

#

It does work with a binary sensor as an additional step. Hate it but it is what it is

#

I do have found another issue : it seems to be a stateful thing. My base sensor has been on for the last 4h but the hsitory stats thing only shows me a few minutes (since I created it basically). How can I make it so it actually looks at the data instead of recording as it goes along ? Is this due to the additional step of the binary sensor ?

mild whale
#

it only counts what occurs inside the window you provide

#

and it does use history

karmic topaz
#

Clearly it doesn't

#

Is there an additional setting for only available in yaml or something ?

#

These are the settings

mild whale
#

if you think there is an issue, you're welcome to write up one

#

and if you just created the template entity and you are using the template entity as the base for the History Stats, you're using the history of the template entity. Not the history of it's upstream entity (the numerical one)

karmic topaz
#

Yeah that's what I thought, the binary sensor creates its own data instead of just being a shorthand to reflect the underlying sensor's data

#

This whole mess is caused by history stats being having no option to use comparison or templates, I'm gonna look for a better solution

#

I think I'm just gonna start doing everything in python. Sounds much easier to deal with the data myself directly instead of trying to make HA work in a way that makes sense