mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add missing mystrom sensor (#113225)
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
309f554336
commit
ffe9b7801f
@ -30,6 +30,13 @@ class MyStromSwitchSensorEntityDescription(SensorEntityDescription):
|
|||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES: tuple[MyStromSwitchSensorEntityDescription, ...] = (
|
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(
|
MyStromSwitchSensorEntityDescription(
|
||||||
key="consumption",
|
key="consumption",
|
||||||
device_class=SensorDeviceClass.POWER,
|
device_class=SensorDeviceClass.POWER,
|
||||||
|
@ -17,5 +17,12 @@
|
|||||||
"abort": {
|
"abort": {
|
||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"avg_consumption": {
|
||||||
|
"name": "Average consumption"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user