Only adapt if switch if on in _service_interceptor_turn_on_handler (#642)

* Do not adapt if switch is off in _service_interceptor_turn_on_handler

* Bump to 1.16.1
This commit is contained in:
Bas Nijholt 2023-07-20 17:12:41 -07:00 committed by GitHub
commit 2575f4ec30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -8,5 +8,5 @@
"iot_class": "calculated",
"issue_tracker": "https://github.com/basnijholt/adaptive-lighting/issues",
"requirements": ["ulid-transform"],
"version": "1.16.0"
"version": "1.16.1"
}

View file

@ -1817,6 +1817,9 @@ class TurnOnOffListener:
# This might be a light that is not managed by this AL instance.
return
if not adaptive_switch.is_on:
return
if entity_id not in adaptive_switch.lights:
return