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

Lux threshold logic might be backwards #341

Open
3 tasks done
LordSushiPhoenix opened this issue Dec 6, 2024 · 0 comments
Open
3 tasks done

Lux threshold logic might be backwards #341

LordSushiPhoenix opened this issue Dec 6, 2024 · 0 comments

Comments

@LordSushiPhoenix
Copy link

What version of Adaptive Cover are you using?

1.4.5

What version of Home Assistant are you using?

2024.11.1

Checklist

  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

In normal_with_presence(), the comment states that the first check is to see if it's not summer and either lux, irradiance, or sunny weather is present, but the logic seems to reflect a check for (not summer) and either (lux<=threshold, irradiance<=threshold, or weather is not sunny). In my config, this results in the blind staying open during "non sunny" weather despite the lux sensor reporting above the threshold (>700lux in my case).

This seems opposite from what should be expected, where even if the weather is "not sunny", if the lux threshold is exceeded glare should be reduced. I can work around this by adding more weather conditions to the configuration so that the lux sensor is always preferred, but I'm not sure if this is intended.

Reproduction steps

  1. Be not summer (ClimateCoverData.is_summer() returns false)
  2. Have sun in front of window
  3. Have room occupied
  4. Have lux sensor above configured threshold (ClimateCoverData.lux() returns false)
  5. Have weather state that is not in the configured weather conditions (ClimateCoverData.is_sunny() returns true)
  6. Blind will be set to 100% or the default value instead of the optimal position to reduce glare.

Diagnostics dump

No response

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

No branches or pull requests

1 participant