diff --git a/homeassistant/components/solarlog/sensor.py b/homeassistant/components/solarlog/sensor.py index 0b5d56f1a9e..a0d6d4bc540 100644 --- a/homeassistant/components/solarlog/sensor.py +++ b/homeassistant/components/solarlog/sensor.py @@ -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", diff --git a/homeassistant/components/solarlog/strings.json b/homeassistant/components/solarlog/strings.json index caa14ac01a6..f5f5e064294 100644 --- a/homeassistant/components/solarlog/strings.json +++ b/homeassistant/components/solarlog/strings.json @@ -79,6 +79,9 @@ "consumption_total": { "name": "Consumption total" }, + "self_consumption_year": { + "name": "Self-consumption year" + }, "total_power": { "name": "Installed peak power" },