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

If in constrained period and override is set it’s ignored when constraint ends #31

Closed
jwelter1971 opened this issue Feb 9, 2019 · 4 comments

Comments

@jwelter1971
Copy link

jwelter1971 commented Feb 9, 2019

I have kids rooms set with a motion constraint to allow operating from 8am to 8pm.

I also have a override that comes on if bright enough we don’t need lights.

That override was tripped at 7:58am but when constraint ended at 8am it was ignored

I think we need to check override sensor state when entering and exiting constrained period?

@danobot
Copy link
Owner

danobot commented Feb 10, 2019

This means that override state overrides all other states, including constrained.
Easy to implement, but it is a bit confusing from user perspective to see the entity in override state when it should be constrained. Will investigate if what you suggested is feasable. I do not want to add if/else checks everywhere.

@jwelter1971
Copy link
Author

jwelter1971 commented Feb 10, 2019

Hi Danny I think constrained should (and does) have priority over any overrides. So when in constrained mode it's completely inactive. That is currently how it works.

The only problem is when it exists constrained mode (and perhaps enter - not tested that specifically) if the trigger for an override is already set it seems to be ignored. If I toggle that override state off/on outside of constrained mode what we expect happens; the lightings goes into overrides mode.

What I would expect is going from constrained-->override mode would occur.

Set example here:

motion_connor_bedroom:
   sensors: 
      - binary_sensor.connor_pir_sensor
   entities: 
      - light.connors_ceiling_fan_light
   state_entities:
      - group.connors_bedroom_lights
   delay: 900
   sensor_type_duration: True
   start_time: '08:00:00' 
   end_time: '19:30:00' 
   overrides:
      - binary_sensor.auto_lights_override

@danobot
Copy link
Owner

danobot commented Feb 11, 2019

See v2.4.10.

@danobot danobot closed this as completed Feb 11, 2019
@jwelter1971
Copy link
Author

Hi Danny - thanks for the update. Running it now. We've come into some bad weather so it might be a few days to get a real world test completed as need some sun to happen to cause the override to get tripped.

Under some manual testing it seems to do the job.

Thanks!

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

2 participants