Closed illuzn closed 4 months ago
I have the same problem, rollback to 0.7.2 worked for now.
json_data = json.loads(pages_file)
or
json_data = json.load(path)
Yes that's the solution, but need to validate
I'm absolutely stumped... I upgraded to HA 2024.7.2 (from 2024.6.x - I forget which I was running when I made this issue) and I just plugged my device in for other reasons and it just worked.
No idea what is going on.
Edit: Ignore my last, I had manually changed the code on line 658 to:
json_data = json.loads(pages_file)
and I'd forgotten I'd done that in the meantime. Whoops I'll send through a PR with this fix.
Version of the custom_component
0.7.3
Configuration
yaml not relevant.
OpenHASP is configured to send a json file (not jsonl). The json file is correctly formatted and is in HA's allowed external directories.
Describe the bug
The following handler fails to load the json file correctly. https://github.com/HASwitchPlate/openHASP-custom-component/blob/24f071cb510f3da0e5c801ccd52eb5abad9c4d6b/custom_components/openhasp/__init__.py#L656-L667
json.load expects a file object but it appears to be receiving a string instead.
Debug log