Add rflink binary_sensor allon and alloff commands (#32411)
* added "allon" and "alloff" to the binary_sensor Ref to the issue: https://github.com/home-assistant/core/issues/32399 * Cosmetic fix * Fix format * Update test Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
ced59e599f
commit
d672eed331
2 changed files with 16 additions and 4 deletions
|
@ -73,9 +73,9 @@ class RflinkBinarySensor(RflinkDevice, BinarySensorDevice):
|
|||
def _handle_event(self, event):
|
||||
"""Domain specific event handler."""
|
||||
command = event["command"]
|
||||
if command == "on":
|
||||
if command in ["on", "allon"]:
|
||||
self._state = True
|
||||
elif command == "off":
|
||||
elif command in ["off", "alloff"]:
|
||||
self._state = False
|
||||
|
||||
if self._state and self._off_delay is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue