Closed ngolosov closed 1 year ago
I'll have a look at this issue today for you, hopefully can get a fix out today too.
Thanks for the api output that's really helpful 👍, will let you know if I need any more info
I've just released version 2023.9.1, this check the revision of the sock being used, I noticed yours was revision 5, whereas mine is revision 2, and will ignore the vitals that are no longer present in the json that you provided.
I've taken a bit of a punt that this will be correct and the revision was the right thing to use, as I only have a single sock to test with it's hard to say though. This should however work for yourself.
If other users with revision 5 socks report that they were in fact getting the vitals you were missing I'll have to have a rethink.
Let me know if any issues.
Firstly, thank you for the integration—it's exceptionally helpful and well-crafted. However, I encountered an issue when replacing my DreamSock.
I recently swapped out my old DreamSock(purchased a couple of months ago) for a new one of the same model (both US versions, just got a warranty replacement). After removing the old device from my account and starting the setup for the new one, the Owlet-Dream app prompted a firmware update, which I accepted. Following the update, I attempted to reconfigure the integration, but encountered the following error in the Home Assistant log:
The error suggests that entries like "LOST_POWER_ALRT" might have been removed or renamed in the Ayala JSON API output. As a temporary workaround, I commented out several lines in pyowletapi/sock.py:
I also commented out the line:
However, I'm uncertain if that's necessary since entries like "hw": "oss" and "hw": "obss" are still evident in the API output. But without the modification, it still throws a KeyError on "hw".
To rectify this, I believe changes to the pyowletapi library might be necessary. I'd appreciate it if you could investigate further since I'm not deeply versed in Home Assistant.
Attached is the full API output for reference.
api_output.txt