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

Fails to start with Home Assistant 2022.3.0b5 (unexpected keyword argument 'new_state') #39

Closed
Steltek opened this issue Mar 1, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Steltek
Copy link

Steltek commented Mar 1, 2022

General information

Home Assistant

Version: 2022.3.0b5
Installation method (according to instructions):
[X] Operating System
[ ] Container
[ ] Supervised
[ ] Core

Integration

Installation method:
[X] HACS
[ ] manual from release
[ ] manual from git
Integration version: v1.8.2
Root topic:

Application settings

topic:
[X] I can see MQTT messages from application at MQTT-server

How it works now?

The integration used to work. (MQTT broker settings etc all fine and have not changed.)

Upon startup, the integration errors out with "TypeError: async_subscribe_topics() got an unexpected keyword argument 'new_state'"

Debug log

2022-03-01 14:18:50 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up sleep_as_android platform for sensor
Traceback (most recent call last):
  File "/hass/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/hass/.homeassistant/custom_components/sleep_as_android/sensor.py", line 48, in async_setup_entry
    await instance.subscribe_root_topic(async_add_entities)
  File "/hass/.homeassistant/custom_components/sleep_as_android/__init__.py", line 257, in subscribe_root_topic
    self._subscription_state = await subscribe_2021_07(
  File "/hass/.homeassistant/custom_components/sleep_as_android/__init__.py", line 235, in subscribe_2021_07
    return await subscription.async_subscribe_topics(
TypeError: async_subscribe_topics() got an unexpected keyword argument 'new_state'

Additional information

@IATkachenko
Copy link
Owner

Thank you for report.
Will check it. Looks like version comparison goes bad :(

@IATkachenko IATkachenko added the bug Something isn't working label Mar 1, 2022
@IATkachenko
Copy link
Owner

Nice

f"{ha_version.version} >= {AwesomeVersion('2022.3.0')} is {ha_version.version >= AwesomeVersion('2022.3.0')}"
 2022.3.0b5 >= 2022.3.0 is False

I should read documentation carefully...

@IATkachenko
Copy link
Owner

Only 2022.3.0 beta installations affected. Will fix soon.

@IATkachenko
Copy link
Owner

Fixed in v1.8.3.
Because only beta version was affected this release will be marked as pre-release and will be available only if "get beta version" option is turned on for the integration in HACS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants