-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
replace DeviceValueUOM::LIST with a valid UOM #125
Comments
NUM, BOOLEAN, and LIST are no uoms. But as mentioned here this was your hack for HA. But now it is also used for web-commands to render the dialog for bools and enums. Not easy to remove. |
Right, I'll take a stab at fixing it. Should be able to achieve the same using |
The LIST can easily removed, in emsdevice we can use |
ok thanks for checking. I think its worth it. You know me, I'm a sucker for clean and readable code :-) |
OK, i'll remove UOMs: LIST, BOOLEAN and NUM. It's working in my test now. |
great! that was quick. I'm still trying to figure out React Hooks to get the i18n localization working |
Done. Please check the HA-icon for numbers working proper. |
@MichaelDvP it looks great, I couldn't find any issues with changing booleans or enums from the WebUI. Are there still issues you need help with? |
Good, then i close this. |
'LIST' is not a unit of measure (like minutes, kW, % etc) so should be removed and replaced with the
DeviceValueUOM::NONE
as typically lists hold strings.Then in the code, remove the checks and replace by checking the dv.type for
DeviceValueType::ENUM
@MichaelDvP shall I do this or you since this was your addition I believe
The text was updated successfully, but these errors were encountered: