mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Add shelly overcurrent sensor for switches (#122494)
shelly: add overcurrent sensor for switches just like overvoltage shelly switches can react to overcurrent and diable the switch. Unfortunately this is is not mentioned anywhere in the documentation. It can be triggered by a device using more amps than set in "Output protections" under the name "Overcurrent in amperes".
This commit is contained in:
parent
81983d66f4
commit
eb3686af06
@ -204,6 +204,15 @@ RPC_SENSORS: Final = {
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
supported=lambda status: status.get("apower") is not None,
|
||||
),
|
||||
"overcurrent": RpcBinarySensorDescription(
|
||||
key="switch",
|
||||
sub_key="errors",
|
||||
name="Overcurrent",
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
value=lambda status, _: False if status is None else "overcurrent" in status,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
supported=lambda status: status.get("apower") is not None,
|
||||
),
|
||||
"smoke": RpcBinarySensorDescription(
|
||||
key="smoke",
|
||||
sub_key="alarm",
|
||||
|
Loading…
x
Reference in New Issue
Block a user