Closed jaroschek closed 5 months ago
Looks like this is the way. I'd guess most other API implementations don't include redundant state values as you show, I don't think mine has any.
Worst case scenario might be a new user has a device where two states like these differ drastically in meaning but have the same string, where they could either contact their manufacturer or we add an exception. Should not happen though.
Switch to use text representation of enum options (like already done in select entity) to initially show readable options instead of numeric values.
This should solve onboarding issues, where new (and currently unknown) devices with unknown enum options do only show numeric values nobody understands.
As we currently use the numeric values for states in history too, we need to preserve the original translations that allowed localization of enum options.
But there is one downside to this:
Nibe has currently some enum parameters that include redundant text values for different numeric option values like the following:
As soon as we use the text values of the options we can not differentiate the different states any more. But may be this ist noch that important, as Nibe seems not to bother with that too.