init home-assistant

This commit is contained in:
2026-11-19 15:15:32 -05:00
parent 2e81d9d300
commit feec6ef9fb
19230 changed files with 3335526 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
"""SunWEG Sensor definitions for the String type."""
from __future__ import annotations
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.const import UnitOfElectricCurrent, UnitOfElectricPotential
from .sensor_entity_description import SunWEGSensorEntityDescription
STRING_SENSOR_TYPES: tuple[SunWEGSensorEntityDescription, ...] = (
SunWEGSensorEntityDescription(
key="voltage",
name="Voltage",
api_variable_key="_voltage",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE,
suggested_display_precision=2,
),
SunWEGSensorEntityDescription(
key="amperage",
name="Amperage",
api_variable_key="_amperage",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT,
suggested_display_precision=1,
),
)