home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.42k forks source link

AOSmith Integration cannot Understand new API format #128306

Closed ollisdl closed 1 hour ago

ollisdl commented 1 week ago

The problem

AOSmith appears to have changed the format of the hot water status in the api which breaks the Integration.

What version of Home Assistant Core has the issue?

2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

AOsmith

Link to integration documentation on our website

https://www.home-assistant.io/integrations/aosmith

Diagnostics information

Failed setup, will retry: Error communicating with API: Unknown hot water status

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 week ago

Hey there @bdr99, mind taking a look at this issue as it has been labeled with an integration (aosmith) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `aosmith` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign aosmith` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


aosmith documentation aosmith source (message by IssueLinks)

ollisdl commented 1 week ago

https://github.com/home-assistant/core/pull/127678

Related pull found on 2nd review. Seems fix is on the way.

parkerbxyz commented 6 days ago

I am unable to install the integration currently. Log details:

Logger: homeassistant.components.aosmith.config_flow
Source: components/aosmith/config_flow.py:36
integration: A. O. Smith (documentation, issues)
First occurred: October 13, 2024 at 10:05:24 PM (2 occurrences)
Last logged: 12:58:11 AM

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/aosmith/config_flow.py", line 36, in _async_validate_credentials
    await client.get_devices()
  File "/usr/local/lib/python3.12/site-packages/py_aosmith/client.py", line 293, in get_devices
    return list(map(map_device_dict_to_device, compatible_device_dicts))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/py_aosmith/client.py", line 140, in map_device_dict_to_device
    hot_water_status=map_hot_water_status_str_to_hot_water_status(device_dict["data"]["hotWaterStatus"])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/py_aosmith/client.py", line 99, in map_hot_water_status_str_to_hot_water_status
    raise AOSmithUnknownException("Unknown hot water status")
py_aosmith.exceptions.AOSmithUnknownException: Unknown hot water status
TopoTop1 commented 4 days ago

I have the same issue where the API error exists.

I'm still on HA 5.5 and using HAOS on version 11.4. There isn't an update to the integration that I can upgrade to and seems to be the current version.

bdr99 commented 1 hour ago

As @ollisdl correctly pointed out, this has been fixed. The fix will be included in HA 2024.11.

bdr99 commented 1 hour ago

@home-assistant close