sebr / bhyve-home-assistant

Orbit BHyve custom component for Home Assistant
MIT License
251 stars 42 forks source link

User input malformed: 5d250e7b4f0c7d841e14b717 is not a valid option for dictionary value @ data['devices'] #203

Open khammo01 opened 1 year ago

khammo01 commented 1 year ago

Describe the bug I am unable to add a new device through the "Configure" option on the Integrations page. When I attempt to do so, there is a phantom identifier that cannot be cleared. I am unable to add new devices to Home Assistant due to this error. I may have deleted a broken timer device from the b-hyve app which could be associated with the malformed nameless dictionary value. Reloading the integration and reloading Home Assistant does not clear the error. The only apparent workaround is to delete and reinstall the integration and set up all entities again.

BHyve devices Gen 1 Hose faucet timers and 1 and 4 port XD

Integration Diagnostics config_entry-bhyve-4076f34870c59c276e480ae1939f2ea5.json.txt

sebr commented 1 year ago

Can you upload a screenshot of this?

sebr commented 1 year ago

If you could please enable debugging the bhyve component in Home Assistant and upload the logs? Please follow these steps:

  1. Run the service call below to enable debug logging
  2. Attach the log to this issue. It is preferable to only keep lines which contain custom_components.bhyve to avoid unnecessarily sharing information.
logger:
  logs:
    custom_components.bhyve: debug
    pybhyve: debug

Once this is done, you can set the level back to warning

khammo01 commented 1 year ago

Hello, sorry I already cleared the error by editing the config file in config/.storage and deleting the erroneous identifier number. As I mentioned, my guess is the HA integration retained a value for a device deleted on the bhyve side.

I encountered the error on HA / Settings / Integrations / BHyve / Configure when I attempted to add new devices and press Submit. The phantom identifier was visible at the beginning of the list of of devices, but when I click, I could only see the friendly names of the actual existing devices, and no ability to untick the phantom device. If I press submit, I get the above described error on the Submit card.

Would it help if I put the erroneous number back into the config to gather the debug or is it too late?

From: Seb Ruiz @.> Date: Tuesday, June 6, 2023 at 06:35 To: sebr/bhyve-home-assistant @.> Cc: khammo01 @.>, Author @.> Subject: Re: [sebr/bhyve-home-assistant] User input malformed: 5d250e7b4f0c7d841e14b717 is not a valid option for dictionary value @ data['devices'] (Issue #203)

Can you upload a screenshot of this?

— Reply to this email directly, view it on GitHubhttps://github.com/sebr/bhyve-home-assistant/issues/203#issuecomment-1578783764, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACDQJTALH7YB3W6HNEMOPYDXJ4W2BANCNFSM6AAAAAAY3F27BQ. You are receiving this because you authored the thread.Message ID: @.***>

khammo01 commented 1 year ago

the issue came back when I deleted a different bhyve device.

here are screenshots. I don't know how to enable the debug - your logger service call doesn't match what I see in the developer tools / services box. Screenshot 2023-06-09 at 10 46 40 Screenshot 2023-06-09 at 10 46 49 Screenshot 2023-06-09 at 10 49 55

Mark612 commented 1 year ago

I had the same issue. I setup a new hose timer, but did it as a Bluetooth setup and couldn't figure out how to change it to WiFi. I added it to HA. I waited for several minutes, and it stayed grey as a device. I then deleted it from Orbit, and added it again.

Then I went to add the device in this integration again, and I got the same error in this thread. It found the new device again, but submit would fail with this error.

I deleted the offending.storage entries to fix it.

Seems the integration needs a check of all devices before adding more. Or, if the error is received it just deletes that device.