mirror of
https://github.com/home-assistant/core.git
synced 2025-05-20 22:07:08 +00:00
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 default
This commit is contained in:
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…
x
Reference in New Issue
Block a user