1 """SunWEG Sensor definitions for the Inverter type."""
3 from __future__
import annotations
13 from .sensor_entity_description
import SunWEGSensorEntityDescription
15 INVERTER_SENSOR_TYPES: tuple[SunWEGSensorEntityDescription, ...] = (
17 key=
"inverter_energy_today",
19 api_variable_key=
"_today_energy",
20 api_variable_unit=
"_today_energy_metric",
21 native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
22 device_class=SensorDeviceClass.ENERGY,
23 state_class=SensorStateClass.TOTAL_INCREASING,
24 suggested_display_precision=1,
27 key=
"inverter_energy_total",
28 name=
"Lifetime energy output",
29 api_variable_key=
"_total_energy",
30 api_variable_unit=
"_total_energy_metric",
31 native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
32 device_class=SensorDeviceClass.ENERGY,
33 suggested_display_precision=1,
34 state_class=SensorStateClass.TOTAL,
38 key=
"inverter_frequency",
40 api_variable_key=
"_frequency",
41 native_unit_of_measurement=UnitOfFrequency.HERTZ,
42 device_class=SensorDeviceClass.FREQUENCY,
43 suggested_display_precision=1,
46 key=
"inverter_current_wattage",
48 api_variable_key=
"_power",
49 api_variable_unit=
"_power_metric",
50 native_unit_of_measurement=UnitOfPower.WATT,
51 device_class=SensorDeviceClass.POWER,
52 state_class=SensorStateClass.MEASUREMENT,
53 suggested_display_precision=1,
56 key=
"inverter_temperature",
58 api_variable_key=
"_temperature",
59 native_unit_of_measurement=UnitOfTemperature.CELSIUS,
60 device_class=SensorDeviceClass.TEMPERATURE,
61 icon=
"mdi:temperature-celsius",
62 suggested_display_precision=1,
65 key=
"inverter_power_factor",
67 api_variable_key=
"_power_factor",
68 suggested_display_precision=1,