jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
198 stars 48 forks source link

Hubitat configuration flow broken with 2022.7.5 #176

Closed goldbondxyz closed 2 years ago

goldbondxyz commented 2 years ago

Added a few new devices and was prompted by both HA and HE for updates today. When I went to sync the 2 via HA and HE hooks, I receive the following error now within HA Hubitat addon:User input malformed: expected str for dictionary value @ data[‘server_url’] HE version: 2.3.2.139 HA version: core-2022.7.5 Confirmed HA update broke HE integration for me. Restored back to core_2022.7.3 and the HE integration now works…

jason0x43 commented 2 years ago

Try enabling debug logging and check the HA log for errors. I have HA 2022.7.5 running with the integration, so it can work, but that certainly doesn't mean there isn't an issue. 🙂

goldbondxyz commented 2 years ago

Looks like something is broken in my HA itself. :( I just tried BI and same results: User input malformed: is not a valid option for dictionary value @ data['allowed_camera']

goldbondxyz commented 2 years ago

I resolve BI by remove/re-add. No such luck with the painful process for HE integration. Same error. Will try the debugging next...

goldbondxyz commented 2 years ago

Jason, Followed instructions to add debug in configuration.yaml. But, no idea what I am looking for. I don't see anything particularly suspicious in /config/home-assistant.log. There seems to be reporting from the components as I refresh. Is there another log file or something specific to show me when clicking the configure->submit button on the integration causes the above error? I rolled back for now. Rolling back still works. The only thing that has changed is the HA update. I have worked fine for 2+ years prior to.

mbbush commented 2 years ago

I'm having this issue too. If I had to guess, I'd say it's likely related to the python 3.10 upgrade, or perhaps to some new type checking validation added in HA.

It seems like the issue it's complaining about is that the default value (empty) for each of the optional fields doesn't have the right type (expects a string, but the empty field is probably parsed as None). I bet the fix is to use a type which is either string or None. I'll see if I can dig up where that change needs to be made and post a PR if I get a chance.

jason0x43 commented 2 years ago

Oh, I was misunderstanding where the issue is. I see the problem now. When trying to run through the config flow, the integration returns an error when you click 'submit'.

jason0x43 commented 2 years ago

It's something that changed in 2022.7.5; the config flow still works in 2022.7.4.

jason0x43 commented 2 years ago

Try v0.8.1b2.

goldbondxyz commented 2 years ago

Hey Jason, Thanks for quick response. Hoping you can help locating the code. All I see is existing build 0.7.2 . (within HA. I see it here on Github but I have never applied without HACS) Update: I'll skip the manual process for now and wait for the regular release. Thanks again for the quick reply!

jason0x43 commented 2 years ago

Open the Hubitat integration in HACS, tap the three-dot menu in the upper right of the screen, choose Redownload, and enable "Show beta versions".

mbbush commented 2 years ago

v0.8.1b2 fixes the issue for me. Thanks for the quick response!

goldbondxyz commented 2 years ago

I can confirm that I am up and running with 0.8.1b2 and 2022.7.5. Thanks Jason!!

jason0x43 commented 2 years ago

The fix has been released in v0.8.1.