From 6921c2776fd036ae88441e9181008f2a1fe93c65 Mon Sep 17 00:00:00 2001 From: Thijs W Date: Sun, 29 Oct 2023 16:23:11 +0000 Subject: [PATCH] Make switch, select and number translatable --- __init__.py | 1 + number.py | 11 +- select.py | 41 +++---- sensor.py | 2 - strings.json | 250 ++++++++++++++++++++++++++++++++++++++----- switch.py | 5 +- translations/en.json | 202 +++++++++++++++++++++++++++++++++- 7 files changed, 447 insertions(+), 65 deletions(-) diff --git a/__init__.py b/__init__.py index e4f1ab1..0d8571b 100644 --- a/__init__.py +++ b/__init__.py @@ -242,6 +242,7 @@ async def _compute_device_infos( name="Inverter", manufacturer="Huawei", model=bridge.model_name, + serial_number=bridge.serial_number, via_device=connecting_inverter_device_id, # type: ignore[typeddict-item] ) diff --git a/number.py b/number.py index eb964c3..cb0b406 100644 --- a/number.py +++ b/number.py @@ -41,13 +41,15 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): dynamic_minimum_key: str | None = None dynamic_maximum_key: str | None = None + def __post_init__(self): + """Defaults the translation_key to the number key.""" + self.translation_key = self.translation_key or self.key.replace('#','_').lower() ENERGY_STORAGE_NUMBER_DESCRIPTIONS: tuple[HuaweiSolarNumberEntityDescription, ...] = ( HuaweiSolarNumberEntityDescription( key=rn.STORAGE_MAXIMUM_CHARGING_POWER, native_min_value=0, static_maximum_key=rn.STORAGE_MAXIMUM_CHARGE_POWER, - name="Maximum charging power", icon="mdi:battery-positive", native_unit_of_measurement=POWER_WATT, entity_category=EntityCategory.CONFIG, @@ -56,7 +58,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): key=rn.STORAGE_MAXIMUM_DISCHARGING_POWER, native_min_value=0, static_maximum_key=rn.STORAGE_MAXIMUM_DISCHARGE_POWER, - name="Maximum discharging power", icon="mdi:battery-negative", native_unit_of_measurement=POWER_WATT, entity_category=EntityCategory.CONFIG, @@ -66,7 +67,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): native_min_value=90, native_max_value=100, native_step=0.1, - name="End-of-charge SOC", icon="mdi:battery-positive", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, @@ -77,7 +77,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): native_max_value=20, dynamic_maximum_key=rn.STORAGE_CAPACITY_CONTROL_SOC_PEAK_SHAVING, native_step=0.1, - name="End-of-discharge SOC", icon="mdi:battery-negative", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, @@ -87,7 +86,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): native_min_value=0, native_max_value=100, native_step=0.1, - name="Backup power SOC", icon="mdi:battery-negative", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, @@ -98,7 +96,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): native_min_value=20, native_max_value=100, native_step=0.1, - name="Grid charge cutoff SOC", icon="mdi:battery-charging-50", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, @@ -107,7 +104,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): key=rn.STORAGE_POWER_OF_CHARGE_FROM_GRID, native_min_value=0, dynamic_maximum_key=rn.STORAGE_MAXIMUM_POWER_OF_CHARGE_FROM_GRID, - name="Grid charge maximum power", icon="mdi:battery-negative", native_unit_of_measurement=POWER_WATT, entity_category=EntityCategory.CONFIG, @@ -119,7 +115,6 @@ class HuaweiSolarNumberEntityDescription(NumberEntityDescription): dynamic_minimum_key=rn.STORAGE_DISCHARGING_CUTOFF_CAPACITY, native_max_value=100, native_step=0.1, - name="Peak Shaving SOC", icon="mdi:battery-arrow-up", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, diff --git a/select.py b/select.py index 25a200f..ba33af2 100644 --- a/select.py +++ b/select.py @@ -40,11 +40,14 @@ class HuaweiSolarSelectEntityDescription(Generic[T], SelectEntityDescription): is_available_key: str | None = None check_is_available_func: Callable[[Any], bool] | None = None + def __post_init__(self): + """Defaults the translation_key to the select key.""" + self.translation_key = self.translation_key or self.key.replace('#','_').lower() + ENERGY_STORAGE_SWITCH_DESCRIPTIONS: tuple[HuaweiSolarSelectEntityDescription, ...] = ( HuaweiSolarSelectEntityDescription( key=rn.STORAGE_EXCESS_PV_ENERGY_USE_IN_TOU, - name="Excess PV energy use in TOU", icon="mdi:battery-charging-medium", entity_category=EntityCategory.CONFIG, ), @@ -53,7 +56,6 @@ class HuaweiSolarSelectEntityDescription(Generic[T], SelectEntityDescription): CAPACITY_CONTROL_SWITCH_DESCRIPTIONS: tuple[HuaweiSolarSelectEntityDescription, ...] = ( HuaweiSolarSelectEntityDescription( key=rn.STORAGE_CAPACITY_CONTROL_MODE, - name="Capacity Control Mode", icon="mdi:battery-arrow-up", entity_category=EntityCategory.CONFIG, # Active capacity control is only available is 'Charge from grid' is enabled @@ -148,10 +150,10 @@ class HuaweiSolarSelectEntity(CoordinatorEntity, HuaweiSolarEntity, SelectEntity entity_description: HuaweiSolarSelectEntityDescription def _friendly_format(self, value: IntEnum): - return value.name.replace("_", " ").capitalize() + return value.name.lower() def _to_enum(self, value: str): - return getattr(self._register_unit, value.replace(" ", "_").upper()) + return getattr(self._register_unit, value.upper()) def __init__( self, @@ -240,48 +242,33 @@ def __init__( self.bridge = bridge self.entity_description = HuaweiSolarSelectEntityDescription( key=rn.STORAGE_WORKING_MODE_SETTINGS, - name="Working Mode", entity_category=EntityCategory.CONFIG, ) self._attr_device_info = device_info self._attr_unique_id = f"{bridge.serial_number}_{self.entity_description.key}" + self._attr_current_option = self.coordinator.data[self.entity_description.key].value.name.lower() # The options depend on the type of battery - self.options_to_values = {} + available_options = [swm.name for swm in rv.StorageWorkingModesC] if bridge.battery_type == rv.StorageProductModel.HUAWEI_LUNA2000: - self.options_to_values = { - "Maximise Self Consumption": rv.StorageWorkingModesC.MAXIMISE_SELF_CONSUMPTION, - "Time Of Use": rv.StorageWorkingModesC.TIME_OF_USE_LUNA2000, - "Fully Fed To Grid": rv.StorageWorkingModesC.FULLY_FED_TO_GRID, - } + available_options.remove(rv.StorageWorkingModesC.TIME_OF_USE_LG.name) elif bridge.battery_type == rv.StorageProductModel.LG_RESU: - self.options_to_values = { - "Maximise Self Consumption": rv.StorageWorkingModesC.MAXIMISE_SELF_CONSUMPTION, - "Time Of Use": rv.StorageWorkingModesC.TIME_OF_USE_LG, - "Fully Fed To Grid": rv.StorageWorkingModesC.FULLY_FED_TO_GRID, - } - - self._update_current_option() + available_options.remove(rv.StorageWorkingModesC.TIME_OF_USE_LUNA2000.name) - self._attr_options = list(self.options_to_values.keys()) - - def _update_current_option(self): - current_value = self.coordinator.data[self.entity_description.key].value - for key, value in self.options_to_values.items(): - if value == current_value: - self._attr_current_option = key + self._attr_options = [option.lower() for option in available_options] @callback def _handle_coordinator_update(self) -> None: """Handle updated data from the coordinator.""" - self._update_current_option() + self._attr_current_option = self.coordinator.data[self.entity_description.key].value.name.lower() self.async_write_ha_state() + async def async_select_option(self, option) -> None: """Change the selected option.""" await self.bridge.set( - rn.STORAGE_WORKING_MODE_SETTINGS, self.options_to_values[option] + rn.STORAGE_WORKING_MODE_SETTINGS, getattr(rv.StorageWorkingModesC, option.upper()) ) self._attr_current_option = option diff --git a/sensor.py b/sensor.py index 561ceae..1585fb2 100644 --- a/sensor.py +++ b/sensor.py @@ -1106,7 +1106,6 @@ def get_pv_entity_descriptions(count: int) -> list[HuaweiSolarSensorEntityDescri [ HuaweiSolarSensorEntityDescription( key=getattr(rn, f"PV_{idx:02}_VOLTAGE"), - name=f"PV {idx} voltage", icon="mdi:lightning-bolt", native_unit_of_measurement=UnitOfElectricPotential.VOLT, device_class=SensorDeviceClass.VOLTAGE, @@ -1114,7 +1113,6 @@ def get_pv_entity_descriptions(count: int) -> list[HuaweiSolarSensorEntityDescri ), HuaweiSolarSensorEntityDescription( key=getattr(rn, f"PV_{idx:02}_CURRENT"), - name=f"PV {idx} current", icon="mdi:lightning-bolt-outline", native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, device_class=SensorDeviceClass.CURRENT, diff --git a/strings.json b/strings.json index 66162d9..4b29b76 100644 --- a/strings.json +++ b/strings.json @@ -49,6 +49,32 @@ } }, "entity": { + "number": { + "storage_maximum_charge_power": { + "name": "Maximum charging power" + }, + "storage_maximum_discharge_power": { + "name": "Maximum discharging power" + }, + "storage_charging_cutoff_capacity": { + "name": "End-of-charge SOC" + }, + "storage_discharging_cutoff_capacity": { + "name": "End-of-discharge SOC" + }, + "storage_backup_power_state_of_charge": { + "name": "Backup power SOC" + }, + "storage_grid_charge_cutoff_state_of_charge": { + "name": "Grid charge cutoff SOC" + }, + "storage_power_of_charge_from_grid": { + "name": "Grid charge maximum power" + }, + "storage_capacity_control_soc_peak_shaving": { + "name": "Peak Shaving SOC" + } + }, "sensor": { "input_power": { "name": "Input power" @@ -152,7 +178,7 @@ "input_current": { "name": "Input current" }, - "tempreature": { + "temperature": { "name": "[%key:component::sensor::entity_component::temperature::name%]" }, "running_status": { @@ -268,6 +294,180 @@ }, "storage_fixed_charging_and_discharging_periods": { "name": "Fixed charging periods" + }, + "pv_01_voltage": { + "name": "PV 1 voltage" + }, + "pv_01_current": { + "name": "PV 1 current" + }, + "pv_02_voltage": { + "name": "PV 2 voltage" + }, + "pv_02_current": { + "name": "PV 2 current" + }, + "pv_03_voltage": { + "name": "PV 3 voltage" + }, + "pv_03_current": { + "name": "PV 3 current" + }, + "pv_04_voltage": { + "name": "PV 4 voltage" + }, + "pv_04_current": { + "name": "PV 4 current" + }, + "pv_05_voltage": { + "name": "PV 5 voltage" + }, + "pv_05_current": { + "name": "PV 5 current" + }, + "pv_06_voltage": { + "name": "PV 6 voltage" + }, + "pv_06_current": { + "name": "PV 6 current" + }, + "pv_07_voltage": { + "name": "PV 7 voltage" + }, + "pv_07_current": { + "name": "PV 7 current" + }, + "pv_08_voltage": { + "name": "PV 8 voltage" + }, + "pv_08_current": { + "name": "PV 8 current" + }, + "pv_09_voltage": { + "name": "PV 9 voltage" + }, + "pv_09_current": { + "name": "PV 9 current" + }, + "pv_10_voltage": { + "name": "PV 10 voltage" + }, + "pv_10_current": { + "name": "PV 10 current" + }, + "pv_11_current": { + "name": "PV 11 current" + }, + "pv_12_voltage": { + "name": "PV 12 voltage" + }, + "pv_12_current": { + "name": "PV 12 current" + }, + "pv_13_voltage": { + "name": "PV 13 voltage" + }, + "pv_13_current": { + "name": "PV 13 current" + }, + "pv_14_voltage": { + "name": "PV 14 voltage" + }, + "pv_14_current": { + "name": "PV 14 current" + }, + "pv_15_voltage": { + "name": "PV 15 voltage" + }, + "pv_15_current": { + "name": "PV 15 current" + }, + "pv_16_voltage": { + "name": "PV 16 voltage" + }, + "pv_16_current": { + "name": "PV 16 current" + }, + "pv_17_voltage": { + "name": "PV 17 voltage" + }, + "pv_17_current": { + "name": "PV 17 current" + }, + "pv_18_voltage": { + "name": "PV 18 voltage" + }, + "pv_18_current": { + "name": "PV 18 current" + }, + "pv_19_voltage": { + "name": "PV 19 voltage" + }, + "pv_19_current": { + "name": "PV 19 current" + }, + "pv_20_voltage": { + "name": "PV 20 voltage" + }, + "pv_20_current": { + "name": "PV 20 current" + }, + "pv_21_current": { + "name": "PV 21 current" + }, + "pv_22_voltage": { + "name": "PV 22 voltage" + }, + "pv_22_current": { + "name": "PV 22 current" + }, + "pv_23_voltage": { + "name": "PV 23 voltage" + }, + "pv_23_current": { + "name": "PV 23 current" + }, + "pv_24_voltage": { + "name": "PV 24 voltage" + }, + "pv_24_current": { + "name": "PV 24 current" + } + }, + "select": { + "storage_excess_pv_energy_use_in_tou": { + "name": "Excess PV energy use in TOU", + "state": { + "fed_to_grid": "Fed to grid", + "charge": "Charge" + } + }, + "storage_capacity_control_mode": { + "name": "Capacity Control Mode", + "state": { + "disable": "Disable", + "active_capacity_control": "Active capacity control", + "apparent_power_limit": "Apparent power limit" + } + }, + "storage_working_mode_settings": { + "name": "Working Mode", + "state": { + "adaptive": "Adaptive", + "fixed_charge_discharge": "Fixed charge discharge", + "maximise_self_consumption": "Maximise self consumption", + "time_of_use_lg": "Time of use", + "fully_fed_to_grid": "Fully fed to grid", + "time_of_use_luna2000": "Time of use" + } + } + }, + "switch": { + "storage_charge_from_grid_function": { + "name": "Charge from grid" + }, + "startup": { + "name": "Inverter ON/OFF" } } }, @@ -295,8 +495,8 @@ "description": "Forcible Discharge of the battery for a certain time", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" }, "duration": { "name": "Duration", @@ -313,8 +513,8 @@ "description": "Forcible Charge of the battery to a certain State of Charge level", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" }, "target_soc": { "name": "Target SoC", @@ -331,12 +531,12 @@ "description": "Forcible Discharge of the battery to a certain State of Charge level", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" }, "target_soc": { - "name": "Target SoC", - "description": "State of Charge that must be reached" + "name": "[%key:component::huawei_solar::services::forcible_charge_soc::fields::target_soc::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge_soc::fields::target_soc::description%]" }, "power": { "name": "Power", @@ -349,8 +549,8 @@ "description": "Cancel the running forcible charge command", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" } } }, @@ -369,8 +569,8 @@ "description": "Set Active Power Control to 'DI active scheduling'", "fields": { "device_id": { - "name": "Inverter", - "description": "Must be a 'Inverter' device" + "name": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::description%]" } } }, @@ -379,8 +579,8 @@ "description": "Set Active Power Control to 'Zero power grid connection'", "fields": { "device_id": { - "name": "Inverter", - "description": "Must be a 'Inverter' device" + "name": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::description%]" } } }, @@ -389,8 +589,8 @@ "description": "Sets Active Power Control to 'Power-limited grid connection' with the given wattage", "fields": { "device_id": { - "name": "Inverter", - "description": "Must be a 'Inverter' device" + "name": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::description%]" }, "power": { "name": "Power", @@ -403,8 +603,8 @@ "description": "Sets Active Power Control to 'Power-limited grid connection (%)' with the given percentage", "fields": { "device_id": { - "name": "Inverter", - "description": "Must be a 'Inverter' device" + "name": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::reset_maximum_feed_grid_power::fields::device_id::description%]" }, "power_percentage": { "name": "Power Percentage", @@ -417,8 +617,8 @@ "description": "Sets Time Of Use Periods", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" }, "periods": { "name": "Periods", @@ -431,8 +631,8 @@ "description": "Set Capacity Control Periods", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" }, "periods": { "name": "Periods", @@ -445,8 +645,8 @@ "description": "Sets Fixed Charge and Discharge Periods", "fields": { "device_id": { - "name": "Battery", - "description": "Must be a 'Battery' device" + "name": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::name%]", + "description": "[%key:component::huawei_solar::services::forcible_charge::fields::device_id::description%]" }, "periods": { "name": "Periods", diff --git a/switch.py b/switch.py index 6dc7280..ac9ebce 100644 --- a/switch.py +++ b/switch.py @@ -40,11 +40,13 @@ class HuaweiSolarSwitchEntityDescription(Generic[T], SwitchEntityDescription): is_available_key: str | None = None check_is_available_func: Callable[[Any], bool] | None = None + def __post_init__(self): + """Defaults the translation_key to the switch key.""" + self.translation_key = self.translation_key or self.key.replace('#','_').lower() ENERGY_STORAGE_SWITCH_DESCRIPTIONS: tuple[HuaweiSolarSwitchEntityDescription, ...] = ( HuaweiSolarSwitchEntityDescription( key=rn.STORAGE_CHARGE_FROM_GRID_FUNCTION, - name="Charge from grid", icon="mdi:battery-charging-50", entity_category=EntityCategory.CONFIG, is_available_key=rn.STORAGE_CAPACITY_CONTROL_MODE, @@ -218,7 +220,6 @@ def __init__( self.bridge = bridge self.entity_description = SwitchEntityDescription( rn.STARTUP, - name="Inverter ON/OFF", icon="mdi:power-standby", entity_category=EntityCategory.CONFIG, ) diff --git a/translations/en.json b/translations/en.json index e37a1d9..9645083 100644 --- a/translations/en.json +++ b/translations/en.json @@ -49,6 +49,60 @@ } }, "entity": { + "number": { + "storage_backup_power_state_of_charge": { + "name": "Backup power SOC" + }, + "storage_capacity_control_soc_peak_shaving": { + "name": "Peak Shaving SOC" + }, + "storage_charging_cutoff_capacity": { + "name": "End-of-charge SOC" + }, + "storage_discharging_cutoff_capacity": { + "name": "End-of-discharge SOC" + }, + "storage_grid_charge_cutoff_state_of_charge": { + "name": "Grid charge cutoff SOC" + }, + "storage_maximum_charge_power": { + "name": "Maximum charging power" + }, + "storage_maximum_discharge_power": { + "name": "Maximum discharging power" + }, + "storage_power_of_charge_from_grid": { + "name": "Grid charge maximum power" + } + }, + "select": { + "storage_capacity_control_mode": { + "name": "Capacity Control Mode", + "state": { + "active_capacity_control": "Active capacity control", + "apparent_power_limit": "Apparent power limit", + "disable": "Disable" + } + }, + "storage_excess_pv_energy_use_in_tou": { + "name": "Excess PV energy use in TOU", + "state": { + "charge": "Charge", + "fed_to_grid": "Fed to grid" + } + }, + "storage_working_mode_settings": { + "name": "Working Mode", + "state": { + "adaptive": "Adaptive", + "fixed_charge_discharge": "Fixed charge discharge", + "fully_fed_to_grid": "Fully fed to grid", + "maximise_self_consumption": "Maximise self consumption", + "time_of_use_lg": "Time of use", + "time_of_use_luna2000": "Time of use" + } + } + }, "sensor": { "accumulated_energy_yield": { "name": "Accumulated energy yield" @@ -191,6 +245,144 @@ "power_meter_reactive_power": { "name": "Reactive power" }, + "pv_01_current": { + "name": "PV 1 current" + }, + "pv_01_voltage": { + "name": "PV 1 voltage" + }, + "pv_02_current": { + "name": "PV 2 current" + }, + "pv_02_voltage": { + "name": "PV 2 voltage" + }, + "pv_03_current": { + "name": "PV 3 current" + }, + "pv_03_voltage": { + "name": "PV 3 voltage" + }, + "pv_04_current": { + "name": "PV 4 current" + }, + "pv_04_voltage": { + "name": "PV 4 voltage" + }, + "pv_05_current": { + "name": "PV 5 current" + }, + "pv_05_voltage": { + "name": "PV 5 voltage" + }, + "pv_06_current": { + "name": "PV 6 current" + }, + "pv_06_voltage": { + "name": "PV 6 voltage" + }, + "pv_07_current": { + "name": "PV 7 current" + }, + "pv_07_voltage": { + "name": "PV 7 voltage" + }, + "pv_08_current": { + "name": "PV 8 current" + }, + "pv_08_voltage": { + "name": "PV 8 voltage" + }, + "pv_09_current": { + "name": "PV 9 current" + }, + "pv_09_voltage": { + "name": "PV 9 voltage" + }, + "pv_10_current": { + "name": "PV 10 current" + }, + "pv_10_voltage": { + "name": "PV 10 voltage" + }, + "pv_11_current": { + "name": "PV 11 current" + }, + "pv_12_current": { + "name": "PV 12 current" + }, + "pv_12_voltage": { + "name": "PV 12 voltage" + }, + "pv_13_current": { + "name": "PV 13 current" + }, + "pv_13_voltage": { + "name": "PV 13 voltage" + }, + "pv_14_current": { + "name": "PV 14 current" + }, + "pv_14_voltage": { + "name": "PV 14 voltage" + }, + "pv_15_current": { + "name": "PV 15 current" + }, + "pv_15_voltage": { + "name": "PV 15 voltage" + }, + "pv_16_current": { + "name": "PV 16 current" + }, + "pv_16_voltage": { + "name": "PV 16 voltage" + }, + "pv_17_current": { + "name": "PV 17 current" + }, + "pv_17_voltage": { + "name": "PV 17 voltage" + }, + "pv_18_current": { + "name": "PV 18 current" + }, + "pv_18_voltage": { + "name": "PV 18 voltage" + }, + "pv_19_current": { + "name": "PV 19 current" + }, + "pv_19_voltage": { + "name": "PV 19 voltage" + }, + "pv_20_current": { + "name": "PV 20 current" + }, + "pv_20_voltage": { + "name": "PV 20 voltage" + }, + "pv_21_current": { + "name": "PV 21 current" + }, + "pv_22_current": { + "name": "PV 22 current" + }, + "pv_22_voltage": { + "name": "PV 22 voltage" + }, + "pv_23_current": { + "name": "PV 23 current" + }, + "pv_23_voltage": { + "name": "PV 23 voltage" + }, + "pv_24_current": { + "name": "PV 24 current" + }, + "pv_24_voltage": { + "name": "PV 24 voltage" + }, "reactive_power": { "name": "Reactive power" }, @@ -263,12 +455,20 @@ "storage_total_discharge": { "name": "Total discharge" }, - "tempreature": { + "temperature": { "name": "Temperature" }, "voltage_to_ground": { "name": "Voltage to ground" } + }, + "switch": { + "startup": { + "name": "Inverter ON/OFF" + }, + "storage_charge_from_grid_function": { + "name": "Charge from grid" + } } }, "services": {