Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent light.turn_on of light that was just turned off #727

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

basnijholt
Copy link
Owner

@basnijholt basnijholt commented Aug 9, 2023

Closes #726

This was a rare condition that showed up when the update that happens at interval occurred at the same moment as light.turn_off was called. In that case this happens in this order:

  1. someone calls light.turn_off, but light_state=off has not been registered
  2. AL starts regular update
  3. HA registers light as off
  4. AL makes an update and sets the colors/brightness to the state it thinks it should have (which turns on the light again).

@basnijholt basnijholt merged commit 597e050 into main Aug 9, 2023
15 checks passed
@basnijholt basnijholt deleted the lights-turning-on-interval branch August 9, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lights turning on after turning off (reported by @robmarshall2)
1 participant