Add missing mystrom sensor (#113225)
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com> Co-authored-by: Franck Nijhof <frenck@frenck.nl>pull/113505/head
parent
309f554336
commit
ffe9b7801f
|
@ -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,
|
||||
|
|
|
@ -17,5 +17,12 @@
|
|||
"abort": {
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"avg_consumption": {
|
||||
"name": "Average consumption"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue