Add sensor for self-consumption in solarlog (#119885)

This commit is contained in:
dontinelli 2024-06-21 16:16:09 +02:00 committed by GitHub
parent b931c3ffcf
commit 97a025ccc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -146,6 +146,13 @@ SENSOR_TYPES: tuple[SolarLogSensorEntityDescription, ...] = (
state_class=SensorStateClass.TOTAL,
value=lambda value: round(value / 1000, 3),
),
SolarLogSensorEntityDescription(
key="self_consumption_year",
translation_key="self_consumption_year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
SolarLogSensorEntityDescription(
key="total_power",
translation_key="total_power",