mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Shelly: Power and Energy sensors in roller mode (#39709)
This commit is contained in:
parent
b0ba0e77f8
commit
ca26c8bbd7
@ -58,6 +58,12 @@ SENSORS = {
|
|||||||
value=lambda value: round(value, 1),
|
value=lambda value: round(value, 1),
|
||||||
device_class=sensor.DEVICE_CLASS_POWER,
|
device_class=sensor.DEVICE_CLASS_POWER,
|
||||||
),
|
),
|
||||||
|
("roller", "rollerPower"): BlockAttributeDescription(
|
||||||
|
name="Power",
|
||||||
|
unit=POWER_WATT,
|
||||||
|
value=lambda value: round(value, 1),
|
||||||
|
device_class=sensor.DEVICE_CLASS_POWER,
|
||||||
|
),
|
||||||
("device", "energy"): BlockAttributeDescription(
|
("device", "energy"): BlockAttributeDescription(
|
||||||
name="Energy",
|
name="Energy",
|
||||||
unit=ENERGY_KILO_WATT_HOUR,
|
unit=ENERGY_KILO_WATT_HOUR,
|
||||||
@ -83,6 +89,12 @@ SENSORS = {
|
|||||||
value=lambda value: round(value / 60 / 1000, 2),
|
value=lambda value: round(value / 60 / 1000, 2),
|
||||||
device_class=sensor.DEVICE_CLASS_ENERGY,
|
device_class=sensor.DEVICE_CLASS_ENERGY,
|
||||||
),
|
),
|
||||||
|
("roller", "rollerEnergy"): BlockAttributeDescription(
|
||||||
|
name="Energy",
|
||||||
|
unit=ENERGY_KILO_WATT_HOUR,
|
||||||
|
value=lambda value: round(value / 60 / 1000, 2),
|
||||||
|
device_class=sensor.DEVICE_CLASS_ENERGY,
|
||||||
|
),
|
||||||
("sensor", "concentration"): BlockAttributeDescription(
|
("sensor", "concentration"): BlockAttributeDescription(
|
||||||
name="Gas Concentration",
|
name="Gas Concentration",
|
||||||
unit=CONCENTRATION_PARTS_PER_MILLION,
|
unit=CONCENTRATION_PARTS_PER_MILLION,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user