-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HACS install sensor.py mapping incorrect attributes #2
Comments
@ppastur, I expected this indeed, I'm wondering if this is related to your robot or not. I could easily add a if else based on robot numbers .. or try catch ... but not sure what the cleanest solution is. at this moment the try catch seems the cleanest to avoid building up a list of "supported" robots. Might need to add the list of "tested" robots in the readme, that would also avoid people wondering why it goes wrong. |
I understand. I cant really comment on the best solution because I have no clue how often the schema will change per model. I do agree that we need to gracefully handle the error so the other attributes can load and worst case scenario you will simply have a reduced list of attributes. In my case, the code stopped and no sensor was instantiated in HASS. I figured it out because I used postman to look at the schema and compare it to what the code was trying to map. |
#2 Fixing incorrect attribute of temperature
@ppastur for me it works indeed, can you try out the new version? added the error logging and catch on the temperature |
Just reloaded the integration from HACS and I can confirm it works without issue. |
I haven’t tested yet guys, once I get my robot back from repairs will try again |
Reposting from #flz/iaqualink-py#23
HACS install works but there is an issue with mapping which prevents the sensor from loading in HASS
I managed to get it working by tweaking sensor.py
Here is what I changed:
line 110 is trying to map
self._temperature = data["state"]["reported"]["equipment"]["robot"]["sensors"]["sns_1"]["val"]
but it should be (in my case)
self._temperature = data["state"]["reported"]["equipment"]["robot"]["sensors"]["sns_1"]["state"]
as "val" doesn't exist
so now I get this
not sure if this is just specific to my device.
The text was updated successfully, but these errors were encountered: