diff --git a/homeassistant/components/mystrom/sensor.py b/homeassistant/components/mystrom/sensor.py index 5c096c87993..2c35d35dad6 100644 --- a/homeassistant/components/mystrom/sensor.py +++ b/homeassistant/components/mystrom/sensor.py @@ -30,6 +30,13 @@ class MyStromSwitchSensorEntityDescription(SensorEntityDescription): SENSOR_TYPES: tuple[MyStromSwitchSensorEntityDescription, ...] = ( + MyStromSwitchSensorEntityDescription( + key="avg_consumption", + translation_key="avg_consumption", + device_class=SensorDeviceClass.POWER, + native_unit_of_measurement=UnitOfPower.WATT, + value_fn=lambda device: device.consumedWs, + ), MyStromSwitchSensorEntityDescription( key="consumption", device_class=SensorDeviceClass.POWER, diff --git a/homeassistant/components/mystrom/strings.json b/homeassistant/components/mystrom/strings.json index 9ebd1c36df0..80d0866f6f4 100644 --- a/homeassistant/components/mystrom/strings.json +++ b/homeassistant/components/mystrom/strings.json @@ -17,5 +17,12 @@ "abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" } + }, + "entity": { + "sensor": { + "avg_consumption": { + "name": "Average consumption" + } + } } }