-
Notifications
You must be signed in to change notification settings - Fork 36
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
HA state_class & device_class #38
Comments
I think that might be overkill. But perhaps that could be a good way to declare parameters that is good to have default. I do like having higher level entities like climate and waterheater, those we need to represent somehow too. This is what i did in nibeuplink: https://github.com/elupus/nibeuplink/blob/1798c3840a73b0a35fc54f3c70033b8d331d0de6/src/nibeuplink/const.py#L72 |
No I do not offer to add these manually. We can try to detect these from |
This is how I did it in yozik04/nibe-mqtt@aa83e47 |
We already do that in the HA integration. Those classes are internal to HA so they should not really be in lib. |
I was thinking the same. |
We can mark them here with a custom unit, and translate that in HA. |
Would adding state_class "measurement" for any integers be a solution that takes care of most instances? |
Yes, but we also need to to get total/increasing in place. I do think it would be good if we added some unit in the lib. |
If you can define what the units are for counter type measures, I can start manually adding these to jsons. Would compressor starts have a measurement "times" or maybe "#"? |
Or count. However i do think we should have a way of specifying extensions to the raw csv file, that can be applied to multiple pump types. @yozik04 thoughts? |
raw csv files are unmodified files exported from a heatpump or Modbus Manager. I do not want to touch these. We can edit json files if needed. I will need to store manual patches to json files some day, somehow. @tanelvakker compressor starts does not need a unit. It requires state_class=total, I think. https://developers.home-assistant.io/docs/core/entity/sensor/#how-to-choose-state_class-and-last_reset |
@yozik04 yes, but we currently base those data on unit availability. We could as mentioned add state class and device class to the json file. But it does feel very home assistant specific, so i'm a bit hesitant. I did this to move changes to a separate extension file: #40 but maybe it should be a per-device extension file. |
Shown up again: home-assistant/core#104074 we need to figure out some way to handle this. |
@elupus, do we want to have
state_class
anddevice_class
attributes for every coil in json files? You will need them in HomeAssistant integration.The text was updated successfully, but these errors were encountered: