1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add global radiation sensor to Zamg component (#155767)

This commit is contained in:
Stephan Martin
2025-11-08 15:32:59 +01:00
committed by GitHub
parent 625d7e2e44
commit 6992bfeef9

View File

@@ -15,6 +15,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
DEGREE,
PERCENTAGE,
UnitOfIrradiance,
UnitOfPrecipitationDepth,
UnitOfPressure,
UnitOfSpeed,
@@ -156,6 +157,14 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT,
para_name="TPAM",
),
ZamgSensorEntityDescription(
key="global_radiation",
name="Global Radiation",
native_unit_of_measurement=UnitOfIrradiance.WATTS_PER_SQUARE_METER,
device_class=SensorDeviceClass.IRRADIANCE,
state_class=SensorStateClass.MEASUREMENT,
para_name="GLOW",
),
)
SENSOR_KEYS: list[str] = [desc.key for desc in SENSOR_TYPES]