Home Assistant Unofficial Reference 2024.12.1
phase.py
Go to the documentation of this file.
1 """SunWEG Sensor definitions for the Phase type."""
2 
3 from __future__ import annotations
4 
5 from homeassistant.components.sensor import SensorDeviceClass
6 from homeassistant.const import UnitOfElectricCurrent, UnitOfElectricPotential
7 
8 from .sensor_entity_description import SunWEGSensorEntityDescription
9 
10 PHASE_SENSOR_TYPES: tuple[SunWEGSensorEntityDescription, ...] = (
12  key="voltage",
13  name="Voltage",
14  api_variable_key="_voltage",
15  native_unit_of_measurement=UnitOfElectricPotential.VOLT,
16  device_class=SensorDeviceClass.VOLTAGE,
17  suggested_display_precision=2,
18  ),
20  key="amperage",
21  name="Amperage",
22  api_variable_key="_amperage",
23  native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
24  device_class=SensorDeviceClass.CURRENT,
25  suggested_display_precision=1,
26  ),
27 )