Add missing voltage sensor in Shelly integration (#56773)
* Disable voltage sensor by default * Add voltage sensor for Shelly 2/2.5 * Enable emeter voltage by defaultpull/56806/head
parent
52e9f76f94
commit
d3df6f26f9
|
@ -83,6 +83,14 @@ SENSORS: Final = {
|
|||
device_class=sensor.DEVICE_CLASS_POWER,
|
||||
state_class=sensor.STATE_CLASS_MEASUREMENT,
|
||||
),
|
||||
("device", "voltage"): BlockAttributeDescription(
|
||||
name="Voltage",
|
||||
unit=ELECTRIC_POTENTIAL_VOLT,
|
||||
value=lambda value: round(value, 1),
|
||||
device_class=sensor.DEVICE_CLASS_VOLTAGE,
|
||||
state_class=sensor.STATE_CLASS_MEASUREMENT,
|
||||
default_enabled=False,
|
||||
),
|
||||
("emeter", "voltage"): BlockAttributeDescription(
|
||||
name="Voltage",
|
||||
unit=ELECTRIC_POTENTIAL_VOLT,
|
||||
|
@ -247,6 +255,7 @@ RPC_SENSORS: Final = {
|
|||
value=lambda status, _: round(float(status["voltage"]), 1),
|
||||
device_class=sensor.DEVICE_CLASS_VOLTAGE,
|
||||
state_class=sensor.STATE_CLASS_MEASUREMENT,
|
||||
default_enabled=False,
|
||||
),
|
||||
"energy": RpcAttributeDescription(
|
||||
key="switch",
|
||||
|
|
Loading…
Reference in New Issue