-
-
Notifications
You must be signed in to change notification settings - Fork 194
Description
What happened?
Yandex gang switches (YNDX_00531 or YNDX_00532) have a quirk where they sometimes automatically bind their genOnOff output endpoints to groupId=1. If you don't have a group with id=1 configured in z2m, you will have strange rows in the Bind page of your switch that don't have a device/group selected but have bind/unbind buttons active.
Trying to press 'Unbind' button will do nothing to the user, but an error appears in the dev console:
Uncaught TypeError: can't access property "friendly_name", n.find(...) is undefined
getBidingParams http://192.168.0.2:8099/assets/ConnectedDevicePage-e594f769.js:1
onBindOrUnBindClick http://192.168.0.2:8099/assets/ConnectedDevicePage-e594f769.js:1
s http://192.168.0.2:8099/assets/index-6a654fd1.js:71I checked the docs and saw that you cannot bind/unbind groups by id, so this cannot be easily fixed by passing an id instead of a friendly name.
While this issue can be avoided by just creating an empty group with id=1, showing some kind of an error in the UI would be nice.
I would like to suggest a PR, but I need to find an example of showing a toast to the user first, or think of some other fix (like not showing bindings for non-existent groups, or disabling bind/unbind buttons)
What browsers are you seeing the problem on?
Firefox
Relevant stacktrace
Uncaught TypeError: can't access property "friendly_name", n.find(...) is undefined
getBidingParams http://192.168.0.2:8099/assets/ConnectedDevicePage-e594f769.js:1
onBindOrUnBindClick http://192.168.0.2:8099/assets/ConnectedDevicePage-e594f769.js:1
s http://192.168.0.2:8099/assets/index-6a654fd1.js:71Did you download state.json.zip?
I will not attach state.json.zip