corvis / homeassistant_prana

HomeAssistant integration with Prana recuperators
GNU General Public License v3.0
23 stars 8 forks source link

New HA can't create entities #8

Open cyberfly79 opened 1 year ago

cyberfly79 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

the same here.

Trteich commented 10 months ago

facing the same behavior

Pierremenard commented 8 months ago

Still facing this problem

Pierremenard commented 7 months ago

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