Background information:
I have 2 PIR sensors, one in the hallway downstairs and one in the hallway upstairs.
I have on light that is controlled with protocol switch1
to turn it on and off
That same light is controlled with protocol dimmer1
to adjust the dimlevel
I want to turn on the light when there is movement detected and the lux is below a certain level.
For this I have the following rules
overloop-motion-licht-aan
WHEN xiaomi-pir-overloop-dummy reports present and lux of xiaomi-pir-overloop <= 15 and hal-verlichting is off THEN turn on hal-verlichting for 10 minutes
overloop-motion-licht-aan
WHEN xiaomi-pir-overloop-dummy reports present and lux of xiaomi-pir-overloop <= 15 and hal-verlichting is off THEN turn on hal-verlichting for 10 minutes
This works just as expected. When there is movement and the lux is to low, the light is turned on for 10 minutes.
Now I have created some extra rules:
hal-verlichting-dimmen-in-de-nacht
WHEN trigger: hal-verlichting is turned on and it is after 23:00 or before 05:00 THEN dim hal-verlichting-dimmer to 25%
hal-verlichting-dimmen-overdag
WHEN trigger: hal-verlichting is turned on and it is after 05:00 and before 23:00 THEN dim hal-verlichting-dimmer to 50%
The goal for these extra rules: adjust the dimlevel according to the time at the moment the light is turned on.
Again, this works as expected.
Example: on 22:45 someone enters the hallway and the light is automatically turned on. Right after that the light is dimmed to 50% and 10 minutes later the light is turned off. Sometime later on 23:05 a other person enters the hallway. The light is turned on again and gets dimmed to 25%. Again, 10 minutes later the light is turned off.
My problem :
Since I have created the extra rules for dimming one of them becomes active at exact 0:00 every night:
info [pimatic]: rule hal-verlichting-dimmen-in-de-nacht: dimmed Hal verlichting dimmer to 25%
I have no clue why this rule becomes active at exactly 0:00 ?
Off course, it has something to do with a new day and the time-window or before 05:00
but that shouldn’t be true since the rule started with trigger: hal-verlichting is turned on
. I am absolutely sure the specific light is no on at that moment.
What is causing this rule to kick in?