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

New HA can't create entities #8

Open
cyberfly79 opened this issue Aug 16, 2023 · 5 comments
Open

New HA can't create entities #8

cyberfly79 opened this issue Aug 16, 2023 · 5 comments

Comments

@cyberfly79
Copy link

Hi,
I use the latest (2023.8) HA in Docker.

So far it was good, but now the integration is broken. The RC server works perfectly, I can see it from cli.

curl -X POST -H "Accept: application/json" http://192.168.0.65:8881/ -d '{ "jsonrpc": "2.0", "id": 1 , "method": "prana.get_state", "params": {"address": "00:A0:50:D2:F6:AF"} }'
{"result": {"speed_locked": 3, "speed_in": 3, "speed_out": 3, "brightness": 6, " night_mode": false, "auto_mode": false, "flows_locked": true, "is_on": false, "m ini_heating_enabled": false, "winter_mode_enabled": false, "is_input_fan_on": fa lse, "is_output_fan_on": false, "sensors": null, "timestamp": "2023-08-16T14:05: 28.192269"}, "id": 1, "jsonrpc": "2.0"}

I deleted the integration and then added it again by address because it doesn't find it. The addition is successful, but the entities are not created.

Its operation will be missed, several automations are connected to it. Could you look into why they are not created?

Thanks!

Cyber

@cyberfly79
Copy link
Author

Hi,

I get this error message when I try to set it up.

2023-08-17 10:19:03.321 ERROR (MainThread) [homeassistant.components.fan] Error adding entities for domain fan with platform prana
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'ble_address'
2023-08-17 10:19:03.329 ERROR (MainThread) [homeassistant.components.fan] Error while setting up prana platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 370, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'ble_address'
2023-08-17 10:19:03.337 ERROR (MainThread) [homeassistant.components.switch] Error adding entities for domain switch with platform prana
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'ble_address'
2023-08-17 10:19:03.344 ERROR (MainThread) [homeassistant.components.light] Error adding entities for domain light with platform prana
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'ble_address'
2023-08-17 10:19:03.357 ERROR (MainThread) [homeassistant.components.switch] Error while setting up prana platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 370, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'ble_address'
2023-08-17 10:19:03.362 ERROR (MainThread) [homeassistant.components.light] Error while setting up prana platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 370, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'ble_address'

@senseysensor
Copy link

the same here.

@Trteich
Copy link

Trteich commented Nov 4, 2023

facing the same behavior

@Pierremenard
Copy link

Still facing this problem

@Pierremenard
Copy link

Temporary workaround: in [config_dir]custom_components/prana/const.py replace
ATTR_DEVICE_ADDRESS = "ble_address"
with
ATTR_DEVICE_ADDRESS = "hw_version"

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

4 participants