wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
538 stars 86 forks source link

[Bug]: unexpected keyword argument 'translation_key' #751

Closed nevesigor closed 2 months ago

nevesigor commented 3 months ago

Describe the issue

Hello, I have just updated my HA and integration and now I have this error when connecting, seems like syntax problem.

Describe your Huawei Solar Setup

Inverter Type: Inverter Firmware version: sDongle present: Yes / No sDongle Type: sDongleA-05 (WiFi / Ethernet) / SDongleA-03 (4G) sDongle Connectivitiy: WiFi / Ethernet / 4G sDongle Firmware: Power meter present: three phase / single phase / no Optimizers Present: Yes / No Battery: LUNA2000-SO xxkWh / LUNA2000-S1 xxkWh (Released 2024) / LG RESU xxkWh / None Battery Firmware version: Huawei Solar integration version:

How do you connect to the inverter?

Via the SDongle, wireless connection

Upload your Diagnostics File

{ "home_assistant": { "installation_type": "Home Assistant Container", "version": "2024.1.4", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "x86_64", "timezone": "Europe/Lisbon", "os_name": "Linux", "os_version": "4.18.0-513.11.1.el8_9.x86_64", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "xiaomi_miio_philipslight": { "version": "2024.2.0.0", "requirements": [ "construct==2.10.68", "python-miio>=0.5.12" ] }, "xiaomi_miio_fan": { "version": "2023.12.0.0", "requirements": [ "construct==2.10.68", "python-miio>=0.5.12" ] }, "prometheus_sensor": { "version": "1.1.2", "requirements": [] }, "huawei_solar": { "version": "1.4.1", "requirements": [ "huawei-solar==2.3.0" ] } }, "integration_manifest": { "domain": "huawei_solar", "name": "Huawei Solar", "after_dependencies": [ "usb" ], "config_flow": true, "documentation": "https://github.com/wlcrs/huawei_solar/wiki", "issue_tracker": "https://github.com/wlcrs/huawei_solar/issues", "requirements": [ "huawei-solar==2.3.0" ], "codeowners": [ "@wlcrs" ], "iot_class": "local_polling", "version": "1.4.1", "loggers": [ "huawei_solar", "pymodbus" ], "is_built_in": false }, "data": { "config_entry_data": { "host": "192.168.1.179", "port": 8899, "slave_ids": [ 1 ], "enable_parameter_configuration": false, "username": null, "password": null }, "pymodbus_version": "3.6.8", "slave_0": { "model_name": "SUN2000-4KTL-L1", "firmware_version": "V200R001C00", "software_version": "V200R001C00SPC109", "pv_string_count": 2, "has_optimizers": 0, "battery_type": 0, "battery_1_type": 0, "battery_2_type": 0, "power_meter_type": null, "supports_capacity_control": false }, "slave_0_inverter_data": {} } }

Upload your relevant debug logs

2024-06-26 01:13:02.105 INFO (MainThread) [huawei_solar.huawei_solar] Waiting for connection ...
2024-06-26 01:13:04.904 INFO (MainThread) [custom_components.huawei_solar.config_flow] Successfully connected to inverter SUN2000-4KTL-L1 with SN XXXFFFFF
2024-06-26 01:13:04.909 INFO (MainThread) [huawei_solar.huawei_solar] Waiting for connection ...
2024-06-26 01:13:07.718 INFO (MainThread) [homeassistant.components.number] Setting up huawei_solar.number
2024-06-26 01:13:07.718 INFO (MainThread) [homeassistant.components.select] Setting up huawei_solar.select
2024-06-26 01:13:07.718 INFO (MainThread) [homeassistant.components.sensor] Setting up huawei_solar.sensor
2024-06-26 01:13:07.718 INFO (MainThread) [homeassistant.components.switch] Setting up huawei_solar.switch
2024-06-26 01:13:07.718 INFO (MainThread) [custom_components.huawei_solar.number] Skipping number setup, as parameter configuration is not enabled
2024-06-26 01:13:07.718 INFO (MainThread) [custom_components.huawei_solar.select] Skipping select setup, as parameter configuration is not enabled
2024-06-26 01:13:07.719 INFO (MainThread) [custom_components.huawei_solar.switch] Skipping switch setup, as parameter configuration is not enabled
2024-06-26 01:13:07.720 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform huawei_solar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 616, 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 'translation_key'
2024-06-26 01:13:07.722 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up huawei_solar platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 616, 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 'translation_key'

Please confirm the following:

wlcrs commented 2 months ago

Outdated HA version.