Skip to content
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

HA update 2023.5 breaks integration #42

Open
jeroenvdd opened this issue May 4, 2023 · 12 comments
Open

HA update 2023.5 breaks integration #42

jeroenvdd opened this issue May 4, 2023 · 12 comments

Comments

@jeroenvdd
Copy link

Something in the latest update breaks the integration,
when rolling back to previous it works again

the error in the log:
Error setting up entry BDR Thermostat for bdr_thermostat Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/bdr_thermostat/__init__.py", line 62, in async_setup_entry hass.config_entries.async_setup_platforms(config_entry, PLATFORMS) AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

@schinddo
Copy link

schinddo commented May 4, 2023

#43 This one is working for me. Just changed the line with the File Editor.

@jeroenvdd
Copy link
Author

#43 This one is working for me. Just changed the line with the File Editor.

I edited the file in vi, rebooted HA and my bdr is up and running again! thx alot dude

@111lisu
Copy link

111lisu commented May 4, 2023

I also modified custom_components/bdr_thermostat/init.py
thx

@phoxy84
Copy link

phoxy84 commented May 5, 2023

So only change line 62:
hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)

to
hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

right?

@jeroenvdd
Copy link
Author

jeroenvdd commented May 5, 2023

So only change line 62: hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)

to hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

right?

yes but add the await command too and give your HA a reboot and it works again :)

@phoxy84
Copy link

phoxy84 commented May 5, 2023

don’t know why but sensors are all unavailable. Integration is loading, but no sensors.

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/bdr_thermostat/BdrAPI.py:175 
Integration: BDR Thermostat (documentation) 
First occurred: 15:28:32 (1 occurrences) 
Last logged: 15:28:32

Error setting up entry BDR Thermostat for bdr_thermostat
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/bdr_thermostat/__init__.py", line 59, in async_setup_entry
    await api.bootstrap()
  File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 49, in bootstrap
    await self._load_capabilities()
  File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 175, in _load_capabilities
    for function, uri in subsystem.items():
AttributeError: 'list' object has no attribute 'items'

IMG_4701

@schinddo
Copy link

schinddo commented May 5, 2023

Please check, that you not forgot the await before hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

@phoxy84
Copy link

phoxy84 commented May 5, 2023

Can you please post the lines? I uploaded mine in the post before.

thanks

@schinddo
Copy link

schinddo commented May 5, 2023

Change line 62 from:

hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)

to

await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

@phoxy84
Copy link

phoxy84 commented May 5, 2023

Oke, thanks for the quick help.

i tried to make two lines and the old line 62 is now 63. On 62 i only put ‘await’ with an single space in front. Now not integration is not loading. Tried with and without the space in front of await.

but with await on the same line (62) it works. Thanks for the help.

I misread i think, on my phone screen the line is cut :)

@Marck
Copy link

Marck commented May 5, 2023

I have also fixed this #43, #40 and some other small changes in my fork. You can use that if you want (or fork that):
https://github.com/Marck/BDRthermostatHA
At the time being a few sensors are not working so those are disabled

@111lisu
Copy link

111lisu commented May 6, 2023

Too bad it doesn't work: sensor.bdr_thermostat_status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants