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
73.55k stars 30.73k forks source link

Evohome: 'EvohomeClient' object has no attribute 'broker' #105393

Closed Zynth-dev closed 11 months ago

Zynth-dev commented 11 months ago

The problem

Like many users I have 2 evohome thermostats. The "default" workaround for supporting 2 of them, is to add a custom integration. This integration is then called "evohome1" and the domain is changed to "evohome1" as well. This always works fine, as many users do as well.

Unfortunately it broke after upgrading to the latest HA. Of course I used all most-recent evohome files from github.

Logger: homeassistant.setup
Source: setup.py:332
First occurred: 16:55:43 (1 occurrences)
Last logged: 16:55:43

Error during setup of component evohome1
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 332, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/evohome1/__init__.py", line 265, in async_setup
    await broker.save_auth_tokens()
  File "/config/custom_components/evohome1/__init__.py", line 446, in save_auth_tokens
    "sessionId": self.client_v1.broker.session_id,
                 ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EvohomeClient' object has no attribute 'broker'

What version of Home Assistant Core has the issue?

core-2023.12.1.

What was the last working version of Home Assistant Core?

core-2023.11 latest

What type of installation are you running?

Home Assistant OS

Integration causing the issue

evohome

Link to integration documentation on our website

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

Diagnostics information

No response

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 11 months ago

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

Code owner commands Code owners of `evohome` 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 evohome` 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)


evohome documentation evohome source (message by IssueLinks)

zxdavb commented 11 months ago

So called 'secondary' evohome instances are not supported by HA. If you get it wrong, it will also interfere with the built-in integration.

However, I can help. This is the same problem as #105373

Have a look at https://github.com/zxdavb/evohome-async/wiki/Hass:-Multiple-Evohome-Locations, where it says:

_NOTE: Every time you upgrade HA, you should expect to upgrade the custom_components folder too._

zxdavb commented 11 months ago

If you still have a problem after looking at the wiki, submit an issue at: https://github.com/zxdavb/evohome-async/issues

Zynth-dev commented 11 months ago

Thanks @zxdavb ! I did re-download all files from the github. But maybe something went wrong somewhere. I will follow the instructions in the wiki.

Also thanks for having that wiki and supporting this "unofficial" way of working.