mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
Shelly: Power and Energy sensors in roller mode (#39709)
This commit is contained in:
@@ -58,6 +58,12 @@ SENSORS = {
|
||||
value=lambda value: round(value, 1),
|
||||
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(
|
||||
name="Energy",
|
||||
unit=ENERGY_KILO_WATT_HOUR,
|
||||
@@ -83,6 +89,12 @@ SENSORS = {
|
||||
value=lambda value: round(value / 60 / 1000, 2),
|
||||
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(
|
||||
name="Gas Concentration",
|
||||
unit=CONCENTRATION_PARTS_PER_MILLION,
|
||||
|
Reference in New Issue
Block a user