cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

Error while renaming a switch "not a valid value for dictionary value @ data['disabled_by']. Got 'integration'" #111

Open Dinth opened 4 years ago

Dinth commented 4 years ago

Im getting the following error when trying to rename a Fibaro Double Switch in integrations menu:

Screenshot 2020-04-29 at 07 45 04
Dinth commented 4 years ago

On a slightly different subject, i would like to add a little suggestion - i really like the entity naming and organization convention in this addon - for example Double Switches are seen as two separate devices instead of one (like in Z2M), but in this case i believe that changing a name of one of the devices should also drop "instance_1" part from the switch name.

Screenshot 2020-04-29 at 07 56 09
marcelveldt commented 4 years ago

Thanks for the report. I can confirm this issue exists but the renaming actually works. The error pops up because we're hiding some entities by default and core seems to dislike that. We'll investigate it.

As for the instance 1 part: You can edit the entity_id to anything you like. The instance 1 part comes from your device itself, the first channel of a double relay is actually named instance 1 in OZW.

bollewolle commented 4 years ago

I have the same issue as described, but in my case I did have several entities where somtimes the "Name Override" was not updated, other times the "Entity ID" was not updated and in some rare cases both of them were not updated. This all while other entities of the same device were updated correctly.

I corrected all of them by now so can't provide proof/screenshots, but thought I'd mention it if others have the issue as well to perhaps provide additional information.

Dinth commented 4 years ago

Yeah, in my case the entity names were actually changed as @marcelveldt said, but errors may be unpredictable.

marcelveldt commented 4 years ago

This issue is fixed in Home Assistant 0.109.0 that's just released.

Dinth commented 4 years ago

I can confirm its still happening on 0.109.0 and 0.0.13. Screenshot from 2020-04-29 19-25-35

marcelveldt commented 4 years ago

OK, strange. Tested with 2 setups and the issue did not appear again. BTW: It seems to be a problem with hass frontend, not specific to this integration.

Can you check if this happens with every device you try to rename ? Also, is there some error in your home assistant log perhaps ?

Dinth commented 4 years ago

Here's the log:

Logger: homeassistant.components.websocket_api.http.connection.140401925699536
Source: components/websocket_api/connection.py:97
Integration: Home Asssitant WebSocket API (documentation, issues)
First occurred: 6:04:06 PM (2 occurrences)
Last logged: 7:25:21 PM

Error handling message: required key not provided @ data['category']. Got None
Error handling message: not a valid value for dictionary value @ data['disabled_by']. Got 'integration'

I have only checked few devices (still trying to figure it out which device is which), but it seems that it doesnt happen with devices not having any disabled entities (great idea btw! this was always so annoying in native zwave) - tested Aeotec gen5 siren and an instance of Fibaro dimmer which only has one switch without sensors. It happens on devices with disabled entities - tested on Fibaro dimmer instance with sensors, Fibaro Double dimmer, Aeotec Multisensor, Octan Remote Controller,

marcelveldt commented 4 years ago

We really can’t reproduce the issue anymore with version 0.109. Maybe you have an old version of the frontend cached in your browser. Could you do us a favor and force refresh hass in your browser and try to reproduce this issue again?

Dinth commented 4 years ago

Im not sure how to force refresh the frontend but usually when it needs a refresh im getting a pop up button in lower bottom corner of HA page asking me to do so - that is not showing up now. But i have tried putting my browser in incognito mode, signing in to HA and renaming the device and im still getting that error. Also i have noticed a funny thing. If a device has disabled entities and i rename it, get an error, then try to rename it immediatelly, im still getting that error. But the devices which i have renamed yesterday (with the error) now can be renamed without an error. My browser is Chrome, Version 80.0.3987.163 (Official Build) Built on Ubuntu , running on LinuxMint 19.3 (64-bit)

marcelveldt commented 4 years ago

OK, thanks for your reply again. We'll dig into it a bit more.

joshtbernstein commented 4 years ago

I know this is being worked on, but just wanted to add a data point: I have a fresh implementation on 0.109.1 and I'm getting this error.

marcelveldt commented 4 years ago

At this time it's just an error in the frontend. Nothing broken. We will look at it once the component gets merged into core