Fix ZHA on with timed off cluster command (#75815)

pull/75816/head
David F. Mulcahey 2022-07-27 08:03:51 -04:00 committed by GitHub
parent 699fff08ed
commit 6254142b8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ class OnOffChannel(ZigbeeChannel):
should_accept = args[0]
on_time = args[1]
# 0 is always accept 1 is only accept when already on
if should_accept == 0 or (should_accept == 1 and self._state):
if should_accept == 0 or (should_accept == 1 and bool(self.on_off)):
if self._off_listener is not None:
self._off_listener()
self._off_listener = None