Add sensor for self-consumption in solarlog (#119885)
This commit is contained in:
parent
b931c3ffcf
commit
97a025ccc1
2 changed files with 10 additions and 0 deletions
|
@ -146,6 +146,13 @@ SENSOR_TYPES: tuple[SolarLogSensorEntityDescription, ...] = (
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
value=lambda value: round(value / 1000, 3),
|
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(
|
SolarLogSensorEntityDescription(
|
||||||
key="total_power",
|
key="total_power",
|
||||||
translation_key="total_power",
|
translation_key="total_power",
|
||||||
|
|
|
@ -79,6 +79,9 @@
|
||||||
"consumption_total": {
|
"consumption_total": {
|
||||||
"name": "Consumption total"
|
"name": "Consumption total"
|
||||||
},
|
},
|
||||||
|
"self_consumption_year": {
|
||||||
|
"name": "Self-consumption year"
|
||||||
|
},
|
||||||
"total_power": {
|
"total_power": {
|
||||||
"name": "Installed peak power"
|
"name": "Installed peak power"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue