-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home Assistant - State class support #129
Comments
I'm not too familiar with the state_class. What are the benefits of adding it to the sensors? Could you try it yourself manually? Use something like MQTTExplorer and modify the topic Also we need to think about which other sensors need modifying. There can be more than 200+ on a system with solar, mixing and multiple heating circuits. Lastly, see if you can upgrade to V3 :-) |
It's the external power supply which prevents me upgrading, unfortunately my boiler does not have a service Jack :-(
I found a way to add the attributes by customizing, but the state_class is going to be elementary. Native support by ems-esp would be good. Do you have a 100% sensor list, e.g. in excel format? I could make a validation. |
All the device values have a Unit Of Measure which can be: NONE and these are used for rendering and also setting the default icon in HA. I'm guessing all them need the state_class 'measurement' apart from LIST, HOURS and MINUTES? |
Unfortunately decision has to be made on sensor level, see https://developers.home-assistant.io/docs/core/entity/sensor/ Example: A sensor representing a setting (e.g. selected flow Temperatur in degree) is no measurement and may contain no sensor class. I'm Not Sure about hours and minutes (e.g. operating hours). Could be total_increasing but I have to ask / try. |
It says "The state represents a measurement in present time, not a historical aggregation such as statistics or a prediction of the future" so in theory all the device values captured on the EMS fall into this category as they are actual live values, and not calculations. I can add to the code. But still not sure what the difference will be in HA or what the advantage is? |
The |
Ok I've made the change in V3 and will monitor it for a few hours. if it works I'll backport it to v2. |
Amazing reactivity 😃 One comment, I'm not sure if Wh and KWh are measurements. Unfortunately I have only a very simple boiler without solar, therefore I cannot test this. If have checked the code (not sure if I missed sensors): For KWH there are the following sensors, All sensors seems to be
For WH there are the following sensors, all sensors seems to be
|
agree, I'll remove the 'measurement' for Wh, KWh, W and KW |
I think it's a good start but a bit more complicated.
For that all values with
The powervalues |
This was my personal understanding, but I'm not 100% sure. Is a setting a measurement?! Regarding Maybe both a question for Home Assistant Community. |
Oh, i thought it was from the HA spec.
I don't use HA and don't know what this |
it does look a little more tricky. I'm still not 100% sure of the value this brings to the end user in HA or what really happens under the sheets within HA. |
right, most people use influx. I thought if you wanted to store more information you just change the 'recorder' and add more days. As Michael mentioned it's not as easy as stating every type EMS-ESP is either a measurement or a total_increasing. Could you specify which values you are particularly interested in having long-term retention for and we'll start with those? For example the temperatures? |
My understanding is, that this will kill one-day home assistant recorder database. Long-term storage does some kind if compression, e.g. calculation max, min and mean values per hour. Thank you for your offer, but there is no pressure including the feature only for me. I did add the state class manually via 'customizing'. I thought it would be a nice improvement for EMS-ESP in general, therefore I have started the discussion. I appreciate open-source products like yours, this was / is my way of participating. If additional requests are coming, the feature can be fully implemented one day. |
moving this to EMS-ESP32 for implementation. |
Added to 3.2.2b10
everything else will not add the |
Is your feature request related to a problem? Please describe.
Since some home assistant releases home assistant supports state_class, which is not support (yet) by EMS-ESP.
Describe the solution you'd like
It would be great if automatic entity creation would support state_class definition. E.g. for temperatures
state_class: measurement
Describe alternatives you've considered
Manual definition / creation of home assistant entities.
Additional context
I know that ESP8266 is no longer supported, but I am still using it... In general the feature would be great for both V2 and V3. Is the code definition part of both V2 and V3 the same...? I could support if someone shows me the respective lines. I assume it's only an additional parameter which has to be added to the respective sensors.
The text was updated successfully, but these errors were encountered: