homeassistant-zwave_mqtt icon indicating copy to clipboard operation
homeassistant-zwave_mqtt copied to clipboard

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

Open Dinth opened this issue 4 years ago • 13 comments

  • Home Assistant version: 0.108.8
  • ozwdaemon version or add-on version: 1.0.15
  • homeassistant-zwave_mqtt version: 0.0.12

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 avatar Apr 29 '20 06:04 Dinth

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

Dinth avatar Apr 29 '20 06:04 Dinth

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.

marcelveldt avatar Apr 29 '20 08:04 marcelveldt

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.

bollewolle avatar Apr 29 '20 10:04 bollewolle

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

Dinth avatar Apr 29 '20 10:04 Dinth

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

marcelveldt avatar Apr 29 '20 16:04 marcelveldt

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

Dinth avatar Apr 29 '20 18:04 Dinth

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 ?

marcelveldt avatar Apr 29 '20 18:04 marcelveldt

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,

Dinth avatar Apr 29 '20 18:04 Dinth

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?

marcelveldt avatar Apr 29 '20 21:04 marcelveldt

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)

Dinth avatar Apr 30 '20 07:04 Dinth

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

marcelveldt avatar Apr 30 '20 07:04 marcelveldt

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.

joshtbernstein avatar Apr 30 '20 19:04 joshtbernstein

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

marcelveldt avatar May 01 '20 08:05 marcelveldt