Open zeev-mindali opened 1 month ago
Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zwave_js documentation zwave_js source (message by IssueLinks)
Please provide the diagnostic file that was asked for when you created the issue:
https://www.home-assistant.io/integrations/zwave_js/#network-devices -> Download diagnostics
config_entry-zwave_js-01J4GRKFXZDKNDWCNE0ZWKH65M.json
here is the diagnostic file
Sorry, I was not specific enough. Please upload the Device diagnostic. Follow the link I posted to the documentation to see how to do that.
zwave_js-01J4GRKFXZDKNDWCNE0ZWKH65M-gp9-42455c5a5e8cdd8dd166aa271dad75cf.json
is this is the file? the documantion is confusing
as i looked into both files, there are two devices gp9 and wallwand. on gp9 it recognized the shutter as : Motor Control Class C on wallwand it recognized the shutter as : Multiposition Motor
in both cases to my opnion it should be a shutter and not a dimmer
HA already assigns cover to both Motor Control Class C
and Multiposition Motor
devices, see for yourself at https://github.com/home-assistant/core/blob/d530137bec3e23a194841e56d32246d8a6e741fa/homeassistant/components/zwave_js/discovery.py#L1058-L1073
The highlighted code detects those device classes and if found treats the multilevel switch value as a cover entity. For some reason this isn't occurring for your devices, I haven't found the reason yet. A light
entity is only assigned if it doesn't match the above.
For example, in the device diagnostic we see that endpoint 8 has device classes:
"8": {
"nodeId": 46,
"index": 8,
"installerIcon": 2048,
"userIcon": 2048,
"deviceClass": {
"basic": {
"key": 4,
"label": "Routing End Node"
},
"generic": {
"key": 17,
"label": "Multilevel Switch"
},
"specific": {
"key": 7,
"label": "Motor Control Class C"
}
},
Which should match the schema along with the primary value which is:
"46-38-8-currentValue": {
"endpoint": 8,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "currentValue",
"propertyName": "currentValue",
"ccVersion": 4,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Current value",
"min": 0,
"max": 99,
"stateful": true,
"secret": false
},
"value": 0
},
So with those two properties it should be matching the cover discovery schema. There must be something very minor that is tripping it up, it will just take some time to find.
o.k. waiting for your inspection. if there any thing i can do from my side, i can try to found out and share the result
any news?
No, I won't be spending any time in this at the moment, sorry. Other things have priority. Anyone is welcome to look.
I had a chance to look. The problem is that HA's discovery process is broken for multi-endpoint devices. The code I linked to above,
is attempting to match on the Node's device class values:
The above check is failing because your node's device class looks like this:
"zwavePlusNodeType": 0,
"zwavePlusRoleType": 5,
"deviceClass": {
"basic": {
"key": 4,
"label": "Routing End Node"
},
"generic": {
"key": 16,
"label": "Binary Switch"
},
"specific": {
"key": 0,
"label": "Unused"
}
},
Notice it doesn't match the motor control class, and so it fails to match the cover schema and ends up as a light. HA should be looking at the endpoint information instead. Here's an example of the information for endpoint 8:
"8": {
"nodeId": 46,
"index": 8,
"installerIcon": 2048,
"userIcon": 2048,
"deviceClass": {
"basic": {
"key": 4,
"label": "Routing End Node"
},
"generic": {
"key": 17,
"label": "Multilevel Switch"
},
"specific": {
"key": 7,
"label": "Motor Control Class C"
}
},
This correctly matches the discovery schema. I don't have a fix in mind, it could be as simple as switching to look at endpoint classes. Or it could be a difficult change. Hopefully one of the main developers will be able to address it with this information.
I think it would be possible to use the corresponding endpoint when matching device class attributes. If there's an issue with that our existing tests should catch that.
i will look into it today, hoping to find the problem. it's a dynamic multi end point rather then fixed type for endpoint.
after check, every device that as multi endpoins, that have shutters , like wallwand , mco Home glass 9, and other, will not work. i check with zwave js ui, it's reflect the correct motor and i can control up/down/stop but in HA integration is doesn't work.
I explained the cause in comment https://github.com/home-assistant/core/issues/123189#issuecomment-2277245517 and potential fix. Someone just needs to implement it (e.g. https://github.com/home-assistant/core/issues/123189#issuecomment-2277660479).
The light entities should still allow you to control the shades, they just appear as lights instead of covers. They will set the position of the shade to the brightness value. You should be able to do open/close with 100% or 0%.
If you want to control the shades in HA the exact same way as in ZUI using the value IDs you can use the zwave_js.set_value action, e.g. set 46-38-9-Up
and 46-38-9-Down
.
dear @kpine
when it's shutter as should be, there is up / stop / down , like a normal shutter. but when it's light, it's act as dimmer, so there is no stop
dear @kpine
where in the code, it's fall back to light dimmer? tried to find with no success
can any one help with the issue? i not familer with python, and i stuck with my curtion and shutter :(
I'll look at it when I'm back from vacation.
@MartinHjelmare any news?
No, I'll update here when there is.
@MartinHjelmare ,
i talked withh ppl in zwave-js-ui, which i use in ha, they fixed on thier side, i can see in thier panel it's cover (c class motor) in ha, it's still shown as light
The problem
i have glass9 which have 2 shutters 2 button and 3 virtual switch i checked the zwave network and the shutters recognized as c class motor. but in home assistant, it's show as light without the option to change it. how can i change it?
What version of Home Assistant Core has the issue?
core-2024.7.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
zwave
Link to integration documentation on our website
zwave js
Diagnostics information
i using zwave js handling zwave devices. the shutter is shown as light with no option to change it
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response