mirror of
https://github.com/home-assistant/core.git
synced 2026-09-05 04:51:05 +01:00
2022 lines
76 KiB
Python
2022 lines
76 KiB
Python
"""Support for Sofar sensors."""
|
|
|
|
from dataclasses import dataclass
|
|
from datetime import date
|
|
from enum import IntEnum
|
|
from typing import cast, override
|
|
|
|
from homeassistant.components.sensor import (
|
|
RestoreSensor,
|
|
SensorDeviceClass,
|
|
SensorEntity,
|
|
SensorEntityDescription,
|
|
SensorStateClass,
|
|
)
|
|
from homeassistant.const import (
|
|
PERCENTAGE,
|
|
EntityCategory,
|
|
UnitOfApparentPower,
|
|
UnitOfElectricCurrent,
|
|
UnitOfElectricPotential,
|
|
UnitOfEnergy,
|
|
UnitOfFrequency,
|
|
UnitOfPower,
|
|
UnitOfReactivePower,
|
|
UnitOfTemperature,
|
|
UnitOfTime,
|
|
)
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
|
|
|
from .coordinator import SofarConfigEntry
|
|
from .entity import SofarEntity, SofarEntityDescription
|
|
|
|
PARALLEL_UPDATES = 0
|
|
|
|
|
|
async def async_setup_entry(
|
|
hass: HomeAssistant,
|
|
entry: SofarConfigEntry,
|
|
async_add_entities: AddConfigEntryEntitiesCallback,
|
|
) -> None:
|
|
"""Set up the Sofar Inverter Modbus sensor platform."""
|
|
runtime_data = entry.runtime_data
|
|
served = runtime_data.served_components
|
|
|
|
entities: list[SensorEntity] = [
|
|
(
|
|
SofarTotalSensor
|
|
if description.state_class
|
|
in (SensorStateClass.TOTAL, SensorStateClass.TOTAL_INCREASING)
|
|
else SofarSensor
|
|
)(runtime_data, description)
|
|
for description in SENSOR_DESCRIPTIONS
|
|
if description.component in served
|
|
]
|
|
async_add_entities(entities)
|
|
|
|
|
|
class SofarSensor(SofarEntity, SensorEntity):
|
|
"""Defines a Sofar sensor."""
|
|
|
|
entity_description: SofarSensorDescription
|
|
|
|
@property
|
|
@override
|
|
def native_value(self) -> str | int | float | date | None:
|
|
component = getattr(self.coordinator.device, self.entity_description.component)
|
|
value = getattr(component, self.entity_description.key)
|
|
# IntEnum stringifies as the raw int; use the option slug.
|
|
if isinstance(value, IntEnum):
|
|
return value.name.lower()
|
|
return cast(str | int | float | date | None, value)
|
|
|
|
|
|
class SofarTotalSensor(SofarEntity, RestoreSensor):
|
|
"""Defines a Sofar cumulative total sensor."""
|
|
|
|
entity_description: SofarSensorDescription
|
|
|
|
@override
|
|
async def async_added_to_hass(self) -> None:
|
|
await super().async_added_to_hass()
|
|
if (last_data := await self.async_get_last_sensor_data()) is None:
|
|
return
|
|
if last_data.native_value is None:
|
|
return
|
|
try:
|
|
val = float(str(last_data.native_value))
|
|
except ValueError, TypeError:
|
|
return
|
|
self._attr_native_value = val
|
|
if self.entity_description.state_class is SensorStateClass.TOTAL_INCREASING:
|
|
component = getattr(
|
|
self.coordinator.device, self.entity_description.component
|
|
)
|
|
component.seed_high_water(self.entity_description.key, val)
|
|
|
|
@property
|
|
@override
|
|
def native_value(self) -> int | float | None:
|
|
component = getattr(self.coordinator.device, self.entity_description.component)
|
|
if self.entity_description.state_class is SensorStateClass.TOTAL_INCREASING:
|
|
value = component.corrected(self.entity_description.key)
|
|
else:
|
|
value = getattr(component, self.entity_description.key)
|
|
if isinstance(value, (int, float)):
|
|
self._attr_native_value = value
|
|
return cast(int | float | None, self._attr_native_value)
|
|
|
|
|
|
@dataclass(frozen=True, kw_only=True)
|
|
class SofarSensorDescription(SensorEntityDescription, SofarEntityDescription):
|
|
"""Describe a Sofar sensor."""
|
|
|
|
|
|
SENSOR_DESCRIPTIONS: tuple[SofarSensorDescription, ...] = (
|
|
SofarSensorDescription(
|
|
key="pv_power_1",
|
|
component="pv_1_2",
|
|
translation_key="pv_power_1",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_2",
|
|
component="pv_1_2",
|
|
translation_key="pv_power_2",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_total",
|
|
component="pv_1_2",
|
|
translation_key="pv_power_total",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
),
|
|
SofarSensorDescription(
|
|
key="solar_generation_total",
|
|
component="energy",
|
|
translation_key="solar_generation_total",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="system_state",
|
|
component="state",
|
|
translation_key="system_state",
|
|
device_class=SensorDeviceClass.ENUM,
|
|
options=[
|
|
"waiting",
|
|
"checking",
|
|
"grid_connected",
|
|
"emergency_power_supply",
|
|
"recoverable_fault",
|
|
"permanent_fault",
|
|
"upgrading",
|
|
"self_charging",
|
|
],
|
|
),
|
|
SofarSensorDescription(
|
|
key="waiting_time",
|
|
component="state",
|
|
translation_key="waiting_time",
|
|
device_class=SensorDeviceClass.DURATION,
|
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="inverter_temperature_1",
|
|
component="state",
|
|
translation_key="inverter_temperature_1",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="inverter_temperature_2",
|
|
component="state",
|
|
translation_key="inverter_temperature_2",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="heatsink_temperature_1",
|
|
component="state",
|
|
translation_key="heatsink_temperature_1",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="heatsink_temperature_2",
|
|
component="state",
|
|
translation_key="heatsink_temperature_2",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="module_temperature_1",
|
|
component="state",
|
|
translation_key="module_temperature_1",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="module_temperature_2",
|
|
component="state",
|
|
translation_key="module_temperature_2",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="serial_number",
|
|
component="identity",
|
|
translation_key="serial_number",
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="grid_frequency",
|
|
component="grid",
|
|
translation_key="grid_frequency",
|
|
device_class=SensorDeviceClass.FREQUENCY,
|
|
native_unit_of_measurement=UnitOfFrequency.HERTZ,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_output_total",
|
|
component="grid",
|
|
translation_key="active_power_output_total",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_output_total",
|
|
component="grid",
|
|
translation_key="reactive_power_output_total",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="apparent_power_output_total",
|
|
component="grid",
|
|
translation_key="apparent_power_output_total",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pcc_total",
|
|
component="grid",
|
|
translation_key="active_power_pcc_total",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_pcc_total",
|
|
component="grid",
|
|
translation_key="reactive_power_pcc_total",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="apparent_power_pcc_total",
|
|
component="grid",
|
|
translation_key="apparent_power_pcc_total",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_l1",
|
|
component="grid",
|
|
translation_key="voltage_l1",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_output_l1",
|
|
component="grid",
|
|
translation_key="current_output_l1",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_output_l1",
|
|
component="grid",
|
|
translation_key="active_power_output_l1",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_output_l1",
|
|
component="grid",
|
|
translation_key="reactive_power_output_l1",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="power_factor_output_l1",
|
|
component="grid",
|
|
translation_key="power_factor_output_l1",
|
|
device_class=SensorDeviceClass.POWER_FACTOR,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_pcc_l1",
|
|
component="grid",
|
|
translation_key="current_pcc_l1",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pcc_l1",
|
|
component="grid",
|
|
translation_key="active_power_pcc_l1",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_pcc_l1",
|
|
component="grid",
|
|
translation_key="reactive_power_pcc_l1",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="power_factor_pcc_l1",
|
|
component="grid",
|
|
translation_key="power_factor_pcc_l1",
|
|
device_class=SensorDeviceClass.POWER_FACTOR,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_l2",
|
|
component="grid",
|
|
translation_key="voltage_l2",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_output_l2",
|
|
component="grid",
|
|
translation_key="current_output_l2",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_output_l2",
|
|
component="grid",
|
|
translation_key="active_power_output_l2",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_output_l2",
|
|
component="grid",
|
|
translation_key="reactive_power_output_l2",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="power_factor_output_l2",
|
|
component="grid",
|
|
translation_key="power_factor_output_l2",
|
|
device_class=SensorDeviceClass.POWER_FACTOR,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_pcc_l2",
|
|
component="grid",
|
|
translation_key="current_pcc_l2",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pcc_l2",
|
|
component="grid",
|
|
translation_key="active_power_pcc_l2",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_pcc_l2",
|
|
component="grid",
|
|
translation_key="reactive_power_pcc_l2",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="power_factor_pcc_l2",
|
|
component="grid",
|
|
translation_key="power_factor_pcc_l2",
|
|
device_class=SensorDeviceClass.POWER_FACTOR,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_l3",
|
|
component="grid",
|
|
translation_key="voltage_l3",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_output_l3",
|
|
component="grid",
|
|
translation_key="current_output_l3",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_output_l3",
|
|
component="grid",
|
|
translation_key="active_power_output_l3",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_output_l3",
|
|
component="grid",
|
|
translation_key="reactive_power_output_l3",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="power_factor_output_l3",
|
|
component="grid",
|
|
translation_key="power_factor_output_l3",
|
|
device_class=SensorDeviceClass.POWER_FACTOR,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_pcc_l3",
|
|
component="grid",
|
|
translation_key="current_pcc_l3",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pcc_l3",
|
|
component="grid",
|
|
translation_key="active_power_pcc_l3",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_pcc_l3",
|
|
component="grid",
|
|
translation_key="reactive_power_pcc_l3",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="power_factor_pcc_l3",
|
|
component="grid",
|
|
translation_key="power_factor_pcc_l3",
|
|
device_class=SensorDeviceClass.POWER_FACTOR,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pv_ext",
|
|
component="grid",
|
|
translation_key="active_power_pv_ext",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_load_sys",
|
|
component="grid",
|
|
translation_key="active_power_load_sys",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_phase_l1n",
|
|
component="grid",
|
|
translation_key="voltage_phase_l1n",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_output_l1n",
|
|
component="grid",
|
|
translation_key="current_output_l1n",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_output_l1n",
|
|
component="grid",
|
|
translation_key="active_power_output_l1n",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_pcc_l1n",
|
|
component="grid",
|
|
translation_key="current_pcc_l1n",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pcc_l1n",
|
|
component="grid",
|
|
translation_key="active_power_pcc_l1n",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_phase_l2n",
|
|
component="grid",
|
|
translation_key="voltage_phase_l2n",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_output_l2n",
|
|
component="grid",
|
|
translation_key="current_output_l2n",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_output_l2n",
|
|
component="grid",
|
|
translation_key="active_power_output_l2n",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="current_pcc_l2n",
|
|
component="grid",
|
|
translation_key="current_pcc_l2n",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_pcc_l2n",
|
|
component="grid",
|
|
translation_key="active_power_pcc_l2n",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_line_l1",
|
|
component="grid",
|
|
translation_key="voltage_line_l1",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_line_l2",
|
|
component="grid",
|
|
translation_key="voltage_line_l2",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="voltage_line_l3",
|
|
component="grid",
|
|
translation_key="voltage_line_l3",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="active_power_offgrid_total",
|
|
component="offgrid",
|
|
translation_key="active_power_offgrid_total",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="reactive_power_offgrid_total",
|
|
component="offgrid",
|
|
translation_key="reactive_power_offgrid_total",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="apparent_power_offgrid_total",
|
|
component="offgrid",
|
|
translation_key="apparent_power_offgrid_total",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_frequency",
|
|
component="offgrid",
|
|
translation_key="offgrid_frequency",
|
|
device_class=SensorDeviceClass.FREQUENCY,
|
|
native_unit_of_measurement=UnitOfFrequency.HERTZ,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_voltage",
|
|
component="offgrid_single_phase",
|
|
translation_key="offgrid_voltage",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_voltage_l1",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_voltage_l1",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_current_output",
|
|
component="offgrid_single_phase",
|
|
translation_key="offgrid_current_output",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_current_output_l1",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_current_output_l1",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_active_power_output",
|
|
component="offgrid_single_phase",
|
|
translation_key="offgrid_active_power_output",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_active_power_output_l1",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_active_power_output_l1",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_reactive_power_output",
|
|
component="offgrid_single_phase",
|
|
translation_key="offgrid_reactive_power_output",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_reactive_power_output_l1",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_reactive_power_output_l1",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_apparent_power_output",
|
|
component="offgrid_single_phase",
|
|
translation_key="offgrid_apparent_power_output",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_apparent_power_output_l1",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_apparent_power_output_l1",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_loadpeakratio",
|
|
component="offgrid_single_phase",
|
|
translation_key="offgrid_loadpeakratio",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_loadpeakratio_l1",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_loadpeakratio_l1",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_voltage_l2",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_voltage_l2",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_current_output_l2",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_current_output_l2",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_active_power_output_l2",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_active_power_output_l2",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_reactive_power_output_l2",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_reactive_power_output_l2",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_apparent_power_output_l2",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_apparent_power_output_l2",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_loadpeakratio_l2",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_loadpeakratio_l2",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_voltage_l3",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_voltage_l3",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_current_output_l3",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_current_output_l3",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_active_power_output_l3",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_active_power_output_l3",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_reactive_power_output_l3",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_reactive_power_output_l3",
|
|
device_class=SensorDeviceClass.REACTIVE_POWER,
|
|
native_unit_of_measurement=UnitOfReactivePower.KILO_VOLT_AMPERE_REACTIVE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_apparent_power_output_l3",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_apparent_power_output_l3",
|
|
device_class=SensorDeviceClass.APPARENT_POWER,
|
|
native_unit_of_measurement=UnitOfApparentPower.KILO_VOLT_AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_loadpeakratio_l3",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_loadpeakratio_l3",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_voltage_output_l1n",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_voltage_output_l1n",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_current_output_l1n",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_current_output_l1n",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_active_power_output_l1n",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_active_power_output_l1n",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_voltage_output_l2n",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_voltage_output_l2n",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_current_output_l2n",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_current_output_l2n",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="offgrid_active_power_output_l2n",
|
|
component="offgrid_three_phase",
|
|
translation_key="offgrid_active_power_output_l2n",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_1",
|
|
component="pv_1_2",
|
|
translation_key="pv_voltage_1",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_1",
|
|
component="pv_1_2",
|
|
translation_key="pv_current_1",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_2",
|
|
component="pv_1_2",
|
|
translation_key="pv_voltage_2",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_2",
|
|
component="pv_1_2",
|
|
translation_key="pv_current_2",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_3",
|
|
component="pv_3",
|
|
translation_key="pv_voltage_3",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_3",
|
|
component="pv_3",
|
|
translation_key="pv_current_3",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_3",
|
|
component="pv_3",
|
|
translation_key="pv_power_3",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_4",
|
|
component="pv_4",
|
|
translation_key="pv_voltage_4",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_4",
|
|
component="pv_4",
|
|
translation_key="pv_current_4",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_4",
|
|
component="pv_4",
|
|
translation_key="pv_power_4",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_5",
|
|
component="pv_5_6",
|
|
translation_key="pv_voltage_5",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_5",
|
|
component="pv_5_6",
|
|
translation_key="pv_current_5",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_5",
|
|
component="pv_5_6",
|
|
translation_key="pv_power_5",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_6",
|
|
component="pv_5_6",
|
|
translation_key="pv_voltage_6",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_6",
|
|
component="pv_5_6",
|
|
translation_key="pv_current_6",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_6",
|
|
component="pv_5_6",
|
|
translation_key="pv_power_6",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_7",
|
|
component="pv_7_8",
|
|
translation_key="pv_voltage_7",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_7",
|
|
component="pv_7_8",
|
|
translation_key="pv_current_7",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_7",
|
|
component="pv_7_8",
|
|
translation_key="pv_power_7",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_8",
|
|
component="pv_7_8",
|
|
translation_key="pv_voltage_8",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_8",
|
|
component="pv_7_8",
|
|
translation_key="pv_current_8",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_8",
|
|
component="pv_7_8",
|
|
translation_key="pv_power_8",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_9",
|
|
component="pv_9_10",
|
|
translation_key="pv_voltage_9",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_9",
|
|
component="pv_9_10",
|
|
translation_key="pv_current_9",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_9",
|
|
component="pv_9_10",
|
|
translation_key="pv_power_9",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_voltage_10",
|
|
component="pv_9_10",
|
|
translation_key="pv_voltage_10",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_current_10",
|
|
component="pv_9_10",
|
|
translation_key="pv_current_10",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="pv_power_10",
|
|
component="pv_9_10",
|
|
translation_key="pv_power_10",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_voltage_1",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_current_1",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_power_1",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_temperature_1",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_state_of_charge_1",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_state_of_health_1",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_1",
|
|
component="battery_1_2",
|
|
translation_key="battery_charge_cycle_1",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_voltage_2",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_current_2",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_power_2",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_temperature_2",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_state_of_charge_2",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_state_of_health_2",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_2",
|
|
component="battery_1_2",
|
|
translation_key="battery_charge_cycle_2",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_voltage_3",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_current_3",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_power_3",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_temperature_3",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_charge_3",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_health_3",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_3",
|
|
component="battery_3_8",
|
|
translation_key="battery_charge_cycle_3",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_voltage_4",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_current_4",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_power_4",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_temperature_4",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_charge_4",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_health_4",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_4",
|
|
component="battery_3_8",
|
|
translation_key="battery_charge_cycle_4",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_voltage_5",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_current_5",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_power_5",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_temperature_5",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_charge_5",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_health_5",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_5",
|
|
component="battery_3_8",
|
|
translation_key="battery_charge_cycle_5",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_voltage_6",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_current_6",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_power_6",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_temperature_6",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_charge_6",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_health_6",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_6",
|
|
component="battery_3_8",
|
|
translation_key="battery_charge_cycle_6",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_voltage_7",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_current_7",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_power_7",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_temperature_7",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_charge_7",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_health_7",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_7",
|
|
component="battery_3_8",
|
|
translation_key="battery_charge_cycle_7",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_voltage_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_voltage_8",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_current_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_current_8",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_power_8",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_temperature_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_temperature_8",
|
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_charge_8",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_state_of_health_8",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_charge_cycle_8",
|
|
component="battery_3_8",
|
|
translation_key="battery_charge_cycle_8",
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_power_total",
|
|
component="battery_totals",
|
|
translation_key="battery_power_total",
|
|
device_class=SensorDeviceClass.POWER,
|
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_capacity_total",
|
|
component="battery_totals",
|
|
translation_key="battery_state_of_charge_total",
|
|
device_class=SensorDeviceClass.BATTERY,
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
state_class=SensorStateClass.MEASUREMENT,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_state_of_health_total",
|
|
component="battery_totals",
|
|
translation_key="battery_state_of_health_total",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
SofarSensorDescription(
|
|
key="solar_generation_today",
|
|
component="energy",
|
|
translation_key="solar_generation_today",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="load_consumption_today",
|
|
component="energy",
|
|
translation_key="load_consumption_today",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="load_consumption_total",
|
|
component="energy",
|
|
translation_key="load_consumption_total",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="import_energy_today",
|
|
component="energy",
|
|
translation_key="import_energy_today",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="import_energy_total",
|
|
component="energy",
|
|
translation_key="import_energy_total",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="export_energy_today",
|
|
component="energy",
|
|
translation_key="export_energy_today",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="export_energy_total",
|
|
component="energy",
|
|
translation_key="export_energy_total",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_input_energy_today",
|
|
component="battery_energy",
|
|
translation_key="battery_input_energy_today",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_input_energy_total",
|
|
component="battery_energy",
|
|
translation_key="battery_input_energy_total",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_output_energy_today",
|
|
component="battery_energy",
|
|
translation_key="battery_output_energy_today",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="battery_output_energy_total",
|
|
component="battery_energy",
|
|
translation_key="battery_output_energy_total",
|
|
device_class=SensorDeviceClass.ENERGY,
|
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="passive_eps_wait_time",
|
|
component="eps",
|
|
translation_key="passive_eps_wait_time",
|
|
device_class=SensorDeviceClass.DURATION,
|
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_protocol",
|
|
component="battery_config_id",
|
|
translation_key="bat_config_protocol",
|
|
device_class=SensorDeviceClass.ENUM,
|
|
options=[
|
|
"first_flight_built_in_bms_default",
|
|
"pie_energy_protocol_pylon",
|
|
"first_flight_protocol_general",
|
|
"amass",
|
|
"lg",
|
|
"alphaess",
|
|
"catl",
|
|
"weco",
|
|
"fronus",
|
|
"ems",
|
|
"nilar",
|
|
"bts_5k",
|
|
"move_for",
|
|
],
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_overvoltage_protection",
|
|
component="battery_config_id",
|
|
translation_key="bat_config_overvoltage_protection",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_charging_voltage",
|
|
component="battery_config",
|
|
translation_key="bat_config_charging_voltage",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_undervoltage_protection",
|
|
component="battery_config",
|
|
translation_key="bat_config_undervoltage_protection",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_minimum_discharge_voltage",
|
|
component="battery_config",
|
|
translation_key="bat_config_minimum_discharge_voltage",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_maximum_charge_current_limit",
|
|
component="battery_config",
|
|
translation_key="bat_config_maximum_charge_current_limit",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_maximum_discharge_current_limit",
|
|
component="battery_config",
|
|
translation_key="bat_config_maximum_discharge_current_limit",
|
|
device_class=SensorDeviceClass.CURRENT,
|
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
suggested_display_precision=2,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_depth_of_discharge",
|
|
component="battery_config",
|
|
translation_key="bat_config_depth_of_discharge",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_end_of_discharge",
|
|
component="battery_config",
|
|
translation_key="bat_config_end_of_discharge",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_capacity",
|
|
component="battery_config",
|
|
translation_key="bat_config_capacity",
|
|
native_unit_of_measurement="Ah",
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_rated_battery_voltage",
|
|
component="battery_config",
|
|
translation_key="bat_config_rated_battery_voltage",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_cell_type",
|
|
component="battery_config",
|
|
translation_key="bat_config_cell_type",
|
|
device_class=SensorDeviceClass.ENUM,
|
|
options=[
|
|
"lead_acid",
|
|
"lithium_iron_phosphate",
|
|
"ternary",
|
|
"lithium_titanate",
|
|
"agm",
|
|
"gel",
|
|
"flooded",
|
|
],
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_eps_buffer",
|
|
component="battery_config",
|
|
translation_key="bat_config_eps_buffer",
|
|
native_unit_of_measurement=PERCENTAGE,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_tempco",
|
|
component="battery_config",
|
|
translation_key="bat_config_tempco",
|
|
native_unit_of_measurement="mV/Cell",
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="bat_config_voltage_float",
|
|
component="battery_config",
|
|
translation_key="bat_config_voltage_float",
|
|
device_class=SensorDeviceClass.VOLTAGE,
|
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
entity_registry_enabled_default=False,
|
|
),
|
|
SofarSensorDescription(
|
|
key="sync_rtc_result",
|
|
component="rtc_sync",
|
|
translation_key="sync_rtc_result",
|
|
device_class=SensorDeviceClass.ENUM,
|
|
options=[
|
|
"successful",
|
|
"operation_in_progress",
|
|
"enabled_discharging",
|
|
"disabled",
|
|
"operation_failed_controller_refused_to_respond",
|
|
"operation_failed_no_response_from_the_controller",
|
|
"operation_failed_current_function_disabled",
|
|
"operation_failed_parameter_access_failed",
|
|
"operation_failed_input_parameters_incorrect",
|
|
],
|
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
),
|
|
)
|