-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
incorrect unit_of_measurement for home assistant for ZW096 power switch #3956
Comments
Updated to latest zwave-js-ui but nothing changed. |
@brianmay Are you using zwave integration or mqtt discovery? |
Mqtt discovery |
Is there a specific reason why you are not using the zwave js integration with zui as server? Using the integration is the recommended way for Home Assistant users: https://zwave-js.github.io/zwave-js-ui/#/homeassistant/homeassistant-official |
I have a lot of my personal code that talks directly using mqtt. |
What should I change in the discovery payload in order to fix the issue so? If a valueId reports power factor or Kvah should I use a different device class? If so which one? |
No idea sorry. I asked here: home-assistant/core#128325 (comment) but the only answer was "It seems the logs are clear on this. Also the sensor docs are clear." which doesn't really help me. |
Oh, I see, from: https://www.home-assistant.io/integrations/sensor/
Pulse count probably shouldn't have a unit. kVAh - if kWh not appropriate (not really sure here), then maybe it shouldn't have a unit. |
Also I think in all cases the device class == power is wrong. |
Yeah I was reading that too but cannot find the appropriate unit for kVAh, there is |
Also could you paste here a node export please? I see I actually handle this here: zwave-js-ui/api/lib/Constants.ts Lines 116 to 185 in 5531846
But maybe that doesn't cover all cases |
Is there somewhere I can send you my node export in private? Rather not send a complete list of my devices to a public forum... Getting puzzled here, because for the relevant device all I see is:
I expected to see more details (???). |
I suspect what we would need is: power factor: "device_class": "power_factor", delete unit_of_measurement For the last two, there doesn't seem to be any good pre-existing device class. Surprised I can't find a "apparent_energy" class actually. "apparent_power" is measuring power, not energy. I tested this. But of course, just because it isn't showing errors doesn't mean it is correct... |
Also I would really like to know why, out of 5 of this devices running the same firmware, only one of them seems to be producing these values. That seems very odd. Here is the meter section of that device: Here is the meter section of another one, same type exactly: Have tried clicking "rediscover node" on both, it didn't change anything. |
PM here: daniel.sorridi@gmail.com
Are you clicking on advanced and then debug export?
I need to understand how to detect this properly. @kpine do you have any clue how home assistant handles this?
Rediscover node has no effect on this as this is ZUI values and rediscover node is an action sent to MQTT discovery. You could try to run a new interview of the node but I'm not sure if that would help. Do you know if that device has fw updates available? About this I cc @AlCalzone |
HA doesn't use the value unit except as a last resort. It has its own mappings based on Command Class and other properties and complicated logic. I couldn't say whether this approach is necessary for your use case. |
Done
advanced -> Backup -> Export
I am not familiar with any fw updates. zwave js ui reports all devices on "FW: v1.4". I am wondering if the difference is the version of zwave I had installed when I did the interviewing. Either that, or I actually have a different generations of what should be the exact same product. The oldest device seems to have the most metrics (15), the most recent device has the fewest (only 4). Huh? Wonder if I should re-interview the old device and see if I still get all the metrics back again. But no going back again if I do lose them... Which might kill any chances of testing a fix for the incorrect units. |
I think he's looking for the debug exports either under the node's Advanced menu, or from the "Debug Info" panel.
You could always try downgrading to a previous version and see if the working behavior can be reproduced. Might be challenging to find the version unless you can remember a time frame. I would be a nice feature to have the a timestamp and/or version number saved for the last interview. |
Agree for the first two, which are unitless, but this part actually looks like a bug in |
Thanks both @kpine and @AlCalzone , so seems this should be fixed with the next driver release? Except for the part of removing kVAh units as seems there is no option for that ATM, may be worth if @brianmay opens an issue on HA about that maybe? |
There's an ongoing discussion about the missing units here: home-assistant/architecture#724 |
I sent him both of those files to his email also. |
@brianmay Thanks, received! |
Checklist
Deploy method
Docker
Z-Wave JS UI version
9.19.0
ZwaveJS version
13.3.0
Describe the bug
Home assistant shows these errors:
I was told this is not a bug in home assistant: home-assistant/core#128325
To Reproduce
(only one of my ZW096 power switch device outputs these values, bit confused here)
Expected behavior
No errors.
Additional context
I just noticed my zwave-js-ui is old, don't see anything in changelog about this being fixed, but will try anyway.
The text was updated successfully, but these errors were encountered: