homeassistant_prana
homeassistant_prana copied to clipboard
New HA can't create entities
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
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'
the same here.
facing the same behavior
Still facing this problem
Temporary workaround: in [config_dir]custom_components/prana/const.py replace ATTR_DEVICE_ADDRESS = "ble_address" with ATTR_DEVICE_ADDRESS = "hw_version"