mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
Warning when calling light.turn_on with brightness=0 (#678)
* Do not update the call when calling light.turn_on with brightness=0 * Simplify * issue warning instead
This commit is contained in:
parent
e0e04da0f6
commit
b80b253fa1
1 changed files with 7 additions and 0 deletions
|
|
@ -1993,6 +1993,13 @@ class AdaptiveLightingManager:
|
|||
if self.manual_control.get(entity_id, False):
|
||||
return
|
||||
|
||||
if data.get(ATTR_BRIGHTNESS) == 0:
|
||||
_LOGGER.warning(
|
||||
"Turn-on call with zero brightness detected, Adaptive Lighting"
|
||||
" intercepted this service_call and adjusted it. If you use this as"
|
||||
" a brightness workaround, please remove it, it is no longer necessary",
|
||||
)
|
||||
|
||||
try:
|
||||
adaptive_switch = _switch_with_lights(self.hass, [entity_id])
|
||||
except NoSwitchFoundError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue