Closed Tommatheussen closed 1 year ago
This is actually a protection mechanism to make sure that lights that are just turned off, are not turned on by AL.
What can happen is that one turns the light off with a light.turn_off
, then HA updates the state, and the light claims to be on (even though it is turning off or actually off).
To make sure we are not in this situation, we wait a little while to check whether the lights are actually off.
It seems like your lights are turned on outside of HA (so not with a light.turn_on
) and therefore only report the on state again.
In this case we cannot distinguish between the protection mechanism and what happens in your case.
You can see that there is no light.turn_on
because this message:
Detected an 'off' → 'on' event for 'light.office' with context.id='01H72WC23KANDQ8RZMQBG8RC6V'
is not accompanied by a
# I wrote this one, this does NOT appear in your logs
Detected an 'light.turn_on('['light.office']')' event with context.id='01H72WC23KANDQ8RZMQBG8RC6V'
Can you confirm that it is something outside of HA that turns on the lights?
Yep that is correct, a physical button (or sensor) turns on and off the lights.
Other than increasing the turn-off timer of the sensor, would you have any other ideas on how to mitigate this issue?
Perhaps you can have an automation like:
automation:
- alias: "Set Manual Control to False after Light Turned On"
trigger:
- platform: state
entity_id: light.YOUR_LIGHT_ENTITY_ID_HERE
from: 'off'
to: 'on'
action:
- service: adaptive_lighting.set_manual_control
data:
entity_id: switch.YOUR_ADAPTIVE_LIGHTING_SWITCH_ENTITY_ID_HERE
lights:
- light.YOUR_LIGHT_ENTITY_ID_HERE
manual_control: false
Thanks! I'll try that one in the coming days. I'll go ahead and close this issue is it's working by design, I do see the reason why it's there :D
Home Assistant Adaptive Lighting Issue Template
Bug Reports
If you need help with using or configuring Adaptive Lighting, please open a Q&A discussion thread here instead.
Before submitting a bug report, please follow these troubleshooting steps:
Please confirm that you have completed the following steps:
Required information for bug reports:
Please include the following information in your issue.
Issues missing this information may not be addressed.
devices.yaml
groups.yaml
configuration.yaml
⚠️; Warning REMOVE ALL of the PERSONAL INFORMATION BELOW before posting ⚠️;server
:user
:password
:pan_id
:network_key
:log_syslog
if you use this