Closed tackin closed 4 months ago
After updating from HA 2024.6.2 to 2024.7.0 I got errors relating to the huawai-Integration.
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:
Via the SDongle, wired connection
{ "home_assistant": { "installation_type": "Home Assistant Container", "version": "2024.7.0", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "6.1.21-v8+", "run_as_root": true }, "custom_components": { "huawei_solar": { "documentation": "https://github.com/wlcrs/huawei_solar/wiki", "version": "1.2.6", "requirements": [ "huawei-solar==2.2.8" ] }, "average": { "documentation": "https://github.com/Limych/ha-average", "version": "2.3.4", "requirements": [] }, "alarmo": { "documentation": "https://github.com/nielsfaber/alarmo", "version": "v1.10.4", "requirements": [] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "tapo": { "documentation": "https://github.com/petretiandrea/home-assistant-tapo-p100", "version": "3.1.2", "requirements": [ "plugp100==5.1.3" ] }, "thermal_comfort": { "documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md", "version": "2.2.2", "requirements": [] }, "config_editor": { "documentation": "https://github.com/htmltiger/config-editor-card", "version": "4.3", "requirements": [] }, "auto_backup": { "documentation": "https://github.com/jcwillox/hass-auto-backup", "version": "1.5.0", "requirements": [] }, "localtuya": { "documentation": "https://github.com/rospogrigio/localtuya/", "version": "5.2.1", "requirements": [] }, "waste_collection_schedule": { "documentation": "https://github.com/mampfes/hacs_waste_collection_schedule#readme", "version": "1.49.0", "requirements": [ "icalendar", "recurring_ical_events", "icalevents", "beautifulsoup4", "lxml" ] } }, "integration_manifest": { "domain": "huawei_solar", "name": "Huawei Solar", "config_flow": true, "documentation": "https://github.com/wlcrs/huawei_solar/wiki", "issue_tracker": "https://github.com/wlcrs/huawei_solar/issues", "requirements": [ "huawei-solar==2.2.8" ], "codeowners": [ "wlcrs" ], "iot_class": "local_polling", "version": "1.2.6", "loggers": [ "huawei_solar", "pymodbus" ], "is_built_in": false }, "setup_times": { "null": { "setup": 5.953689105808735e-05 }, "7a39b1b1d546c59ca7d277dac39cba62": { "wait_import_platforms": -0.04792621987871826, "wait_base_component": -0.002303709974512458, "config_entry_setup": 17.53314668708481 } }, "data": { "config_entry_data": { "host": "192.168.1.134", "port": 502, "slave_ids": [ 1 ], "enable_parameter_configuration": true, "username": null, "password": null }, "slave_0": { "model_name": "SUN2000-10KTL-M1\u0000\u0000\u0000\u0000SUN2000-12", "pv_string_count": 2, "has_optimizers": 0, "battery_type": 0, "battery_1_type": 0, "battery_2_type": 0, "power_meter_type": 1, "supports_capacity_control": false }, "slave_0_data": { "input_power": [ 10464, "W" ], "line_voltage_A_B": [ 411.0, "V" ], "line_voltage_B_C": [ 412.6, "V" ], "line_voltage_C_A": [ 413.3, "V" ], "phase_A_voltage": [ 236.2, "V" ], "phase_B_voltage": [ 236.3, "V" ], "phase_C_voltage": [ 241.3, "V" ], "phase_A_current": [ 14.276, "A" ], "phase_B_current": [ 14.365, "A" ], "phase_C_current": [ 14.366, "A" ], "day_active_power_peak": [ 10762, "W" ], "active_power": [ 10201, "W" ], "reactive_power": [ -138, "VA" ], "power_factor": [ 1.0, null ], "grid_frequency": [ 49.99, "Hz" ], "efficiency": [ 97.49, "%" ], "internal_temperature": [ 66.3, "\u00b0C" ], "insulation_resistance": [ 30.0, "MOhm" ], "device_status": [ "On-grid", null ], "fault_code": [ 0, null ], "startup_time": [ "2024-07-05T04:47:30+00:00", null ], "shutdown_time": [ "2024-07-04T20:43:51+00:00", null ], "accumulated_yield_energy": [ 9780.95, "kWh" ], "daily_yield_energy": [ 19.85, "kWh" ], "state_1": [ [ "Grid-Connected", "Grid-Connected normally" ], null ], "state_2": [ [ "Unlocked", "PV connected", "DSP data collection" ], null ], "state_3": [ [ "On-grid", "Off-grid switch disabled" ], null ], "alarm_1": [ [], null ], "alarm_2": [ [], null ], "alarm_3": [ [], null ], "pv_01_voltage": [ 376.3, "V" ], "pv_01_current": [ 12.38, "A" ], "pv_02_voltage": [ 347.7, "V" ], "pv_02_current": [ 12.47, "A" ], "meter_status": [ 1, null ], "grid_A_voltage": [ 231.6, "V" ], "grid_B_voltage": [ 235.8, "V" ], "grid_C_voltage": [ 239.8, "V" ], "active_grid_A_current": [ 4.56, "I" ], "active_grid_B_current": [ 12.56, "I" ], "active_grid_C_current": [ 12.59, "I" ], "power_meter_active_power": [ 7266, "W" ], "power_meter_reactive_power": [ 340, "Var" ], "active_grid_power_factor": [ -0.996, null ], "active_grid_frequency": [ 49.97, "Hz" ], "grid_exported_energy": [ 7664.12, "kWh" ], "grid_accumulated_energy": [ 1931.47, "kWh" ], "grid_accumulated_reactive_power": [ 0.0, "kVarh" ], "meter_type": [ 1, null ], "active_grid_A_B_voltage": [ 404.8, "V" ], "active_grid_B_C_voltage": [ 412.0, "V" ], "active_grid_C_A_voltage": [ 408.3, "V" ], "active_grid_A_power": [ 1120, "W" ], "active_grid_B_power": [ 3041, "W" ], "active_grid_C_power": [ 3103, "W" ] }, "slave_0_config_data": {} } }
Logger: homeassistant.helpers.event Quelle: helpers/event.py:342 Erstmals aufgetreten: 12:06:30 (4 Vorkommnisse) Zuletzt protokolliert: 12:09:47 Error while dispatching event for sensor.inverter_active_power to <Job track state_changed event {'sensor.power_export', 'sensor.inverter_active_power'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=14>: <RenderInfo Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=14> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.power_export', 'sensor.inverter_active_power'}) rate_limit=None has_time=False exception=None is_static=False>}>>> Error while dispatching event for sensor.power_export to <Job track state_changed event {'sensor.power_export', 'sensor.inverter_active_power'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=24>: <RenderInfo Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=24> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.power_export', 'sensor.inverter_active_power'}) rate_limit=None has_time=False exception=None is_static=False>}>>> Error while dispatching event for sensor.inverter_active_power to <Job track state_changed event {'sensor.power_export', 'sensor.inverter_active_power'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=34>: <RenderInfo Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=34> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.power_export', 'sensor.inverter_active_power'}) rate_limit=None has_time=False exception=None is_static=False>}>>> Error while dispatching event for sensor.inverter_active_power to <Job track state_changed event {'sensor.power_export', 'sensor.inverter_active_power'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=38>: <RenderInfo Template<template=({% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %} {% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.inverter_active_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %} {{ (states('sensor.inverter_active_power')|float(0)) - states('sensor.power_export')|float(0) }} {% else %} {{ states('sensor.power_import')|float(0) + states('sensor.inverter_active_power')|float(0) }} {% endif %}) renders=38> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.power_export', 'sensor.inverter_active_power'}) rate_limit=None has_time=False exception=None is_static=False>}>>> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 648, in state numerical_value = int(value) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 651, in state numerical_value = float(value) ^^^^^^^^^^^^ ValueError: could not convert string to float: '' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 342, in _async_dispatch_entity_id_event hass.async_run_hass_job(job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job hassjob.target(*args) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1284, in _refresh self.hass.async_run_hass_job(self._job, event, updates) File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job hassjob.target(*args) File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 435, in _handle_results self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1133, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.__async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1068, in __async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1013, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 655, in state raise ValueError( ValueError: Sensor sensor.power_consumption has device class 'None', state class 'None' unit 'W' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)
This seems to be about a poorly configured template sensor using values from this integration?
Make sure to properly setup the availability of that sensor.
availability
Describe the issue
After updating from HA 2024.6.2 to 2024.7.0 I got errors relating to the huawai-Integration.
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, wired connection
Upload your Diagnostics File
{ "home_assistant": { "installation_type": "Home Assistant Container", "version": "2024.7.0", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "6.1.21-v8+", "run_as_root": true }, "custom_components": { "huawei_solar": { "documentation": "https://github.com/wlcrs/huawei_solar/wiki", "version": "1.2.6", "requirements": [ "huawei-solar==2.2.8" ] }, "average": { "documentation": "https://github.com/Limych/ha-average", "version": "2.3.4", "requirements": [] }, "alarmo": { "documentation": "https://github.com/nielsfaber/alarmo", "version": "v1.10.4", "requirements": [] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "tapo": { "documentation": "https://github.com/petretiandrea/home-assistant-tapo-p100", "version": "3.1.2", "requirements": [ "plugp100==5.1.3" ] }, "thermal_comfort": { "documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md", "version": "2.2.2", "requirements": [] }, "config_editor": { "documentation": "https://github.com/htmltiger/config-editor-card", "version": "4.3", "requirements": [] }, "auto_backup": { "documentation": "https://github.com/jcwillox/hass-auto-backup", "version": "1.5.0", "requirements": [] }, "localtuya": { "documentation": "https://github.com/rospogrigio/localtuya/", "version": "5.2.1", "requirements": [] }, "waste_collection_schedule": { "documentation": "https://github.com/mampfes/hacs_waste_collection_schedule#readme", "version": "1.49.0", "requirements": [ "icalendar", "recurring_ical_events", "icalevents", "beautifulsoup4", "lxml" ] } }, "integration_manifest": { "domain": "huawei_solar", "name": "Huawei Solar", "config_flow": true, "documentation": "https://github.com/wlcrs/huawei_solar/wiki", "issue_tracker": "https://github.com/wlcrs/huawei_solar/issues", "requirements": [ "huawei-solar==2.2.8" ], "codeowners": [ "wlcrs" ], "iot_class": "local_polling", "version": "1.2.6", "loggers": [ "huawei_solar", "pymodbus" ], "is_built_in": false }, "setup_times": { "null": { "setup": 5.953689105808735e-05 }, "7a39b1b1d546c59ca7d277dac39cba62": { "wait_import_platforms": -0.04792621987871826, "wait_base_component": -0.002303709974512458, "config_entry_setup": 17.53314668708481 } }, "data": { "config_entry_data": { "host": "192.168.1.134", "port": 502, "slave_ids": [ 1 ], "enable_parameter_configuration": true, "username": null, "password": null }, "slave_0": { "model_name": "SUN2000-10KTL-M1\u0000\u0000\u0000\u0000SUN2000-12", "pv_string_count": 2, "has_optimizers": 0, "battery_type": 0, "battery_1_type": 0, "battery_2_type": 0, "power_meter_type": 1, "supports_capacity_control": false }, "slave_0_data": { "input_power": [ 10464, "W" ], "line_voltage_A_B": [ 411.0, "V" ], "line_voltage_B_C": [ 412.6, "V" ], "line_voltage_C_A": [ 413.3, "V" ], "phase_A_voltage": [ 236.2, "V" ], "phase_B_voltage": [ 236.3, "V" ], "phase_C_voltage": [ 241.3, "V" ], "phase_A_current": [ 14.276, "A" ], "phase_B_current": [ 14.365, "A" ], "phase_C_current": [ 14.366, "A" ], "day_active_power_peak": [ 10762, "W" ], "active_power": [ 10201, "W" ], "reactive_power": [ -138, "VA" ], "power_factor": [ 1.0, null ], "grid_frequency": [ 49.99, "Hz" ], "efficiency": [ 97.49, "%" ], "internal_temperature": [ 66.3, "\u00b0C" ], "insulation_resistance": [ 30.0, "MOhm" ], "device_status": [ "On-grid", null ], "fault_code": [ 0, null ], "startup_time": [ "2024-07-05T04:47:30+00:00", null ], "shutdown_time": [ "2024-07-04T20:43:51+00:00", null ], "accumulated_yield_energy": [ 9780.95, "kWh" ], "daily_yield_energy": [ 19.85, "kWh" ], "state_1": [ [ "Grid-Connected", "Grid-Connected normally" ], null ], "state_2": [ [ "Unlocked", "PV connected", "DSP data collection" ], null ], "state_3": [ [ "On-grid", "Off-grid switch disabled" ], null ], "alarm_1": [ [], null ], "alarm_2": [ [], null ], "alarm_3": [ [], null ], "pv_01_voltage": [ 376.3, "V" ], "pv_01_current": [ 12.38, "A" ], "pv_02_voltage": [ 347.7, "V" ], "pv_02_current": [ 12.47, "A" ], "meter_status": [ 1, null ], "grid_A_voltage": [ 231.6, "V" ], "grid_B_voltage": [ 235.8, "V" ], "grid_C_voltage": [ 239.8, "V" ], "active_grid_A_current": [ 4.56, "I" ], "active_grid_B_current": [ 12.56, "I" ], "active_grid_C_current": [ 12.59, "I" ], "power_meter_active_power": [ 7266, "W" ], "power_meter_reactive_power": [ 340, "Var" ], "active_grid_power_factor": [ -0.996, null ], "active_grid_frequency": [ 49.97, "Hz" ], "grid_exported_energy": [ 7664.12, "kWh" ], "grid_accumulated_energy": [ 1931.47, "kWh" ], "grid_accumulated_reactive_power": [ 0.0, "kVarh" ], "meter_type": [ 1, null ], "active_grid_A_B_voltage": [ 404.8, "V" ], "active_grid_B_C_voltage": [ 412.0, "V" ], "active_grid_C_A_voltage": [ 408.3, "V" ], "active_grid_A_power": [ 1120, "W" ], "active_grid_B_power": [ 3041, "W" ], "active_grid_C_power": [ 3103, "W" ] }, "slave_0_config_data": {} } }
Upload your relevant debug logs
Please confirm the following: