- id: '1630261489093'
alias: Eingang Licht bei Bewegung und Dunklheit schalten
description: ''
trigger:
- platform: state
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
to: 'on'
id: 'ON'
- platform: state
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
to: 'off'
for: 00:00:20
id: 'OFF'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'ON'
- condition: state
entity_id: light.lc13_paulmann_level_light_color_on_off
state: 'off'
- condition: numeric_state
entity_id: sensor.lumi_lumi_sensor_motion_aq2_illuminance
below: '140'
sequence:
- service: light.turn_on
target:
entity_id: light.lc13_paulmann_level_light_color_on_off
default:
- service: light.turn_off
target:
entity_id: light.lc13_paulmann_level_light_color_on_off
mode: single
This means that the light is switched on when there is movement and switched off again later.
Unfortunately, if I enter the room at the moment when the light is switching off, then switching it on again does not work.
Can someone help me how to fix this?
Greetings Werner
Hallo,
ich habe folgende Automatisierung angelegt:
- id: '1630261489093'
alias: Eingang Licht bei Bewegung und Dunklheit schalten
description: ''
trigger:
- platform: state
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
to: 'on'
id: 'ON'
- platform: state
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
to: 'off'
for: 00:00:20
id: 'OFF'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'ON'
- condition: state
entity_id: light.lc13_paulmann_level_light_color_on_off
state: 'off'
- condition: numeric_state
entity_id: sensor.lumi_lumi_sensor_motion_aq2_illuminance
below: '140'
sequence:
- service: light.turn_on
target:
entity_id: light.lc13_paulmann_level_light_color_on_off
default:
- service: light.turn_off
target:
entity_id: light.lc13_paulmann_level_light_color_on_off
mode: single
Dadurch wird das Licht bei Bewegung eingeschalten und später wieder ausgeschaltet.
Wenn ich jetzt aber gerade in dem Moment den Raum betrete, wenn das Licht gerade ausschaltet, dann funktioniert das erneute einschalten leider nicht.
I think it happens because the sensor.lumi_lumi_sensor_motion_aq2_illuminance is not updating quick enough (takes longer than 20 seconds) when the light switches off.
If that is true, I suggest you move the illuminance sensor to another place that does not get any other influence except from the sun.
Thanks very much. That would not be my intended solution.
It is strange that the moment the light did not come on, the motion detector was on “motion detected”.
Greetings Werner
Hallo,
vielen Dank. Das wäre nicht meine angestrebte Lösung.
Merkwürdig ist, dass in dem Moment wo das Licht nicht anging, der Bewegungsmelder auf “Bewegung erkannt” stand.
Thanks very much. I will test it, but that may take a while.
Then I’ll get back to you.
But even if it were because of that, the following might be possible :?
Since the light only stays on for a short time, you could define in the automation that the light value had to be below 140, for example 5 minutes ago. So the switched on light would have no influence on it.
Is the ?
Greetings Werner
Hallo,
vielen Dank. Ich werde es testen, dass kann aber etwas dauern.
Dann melde ich mich wieder.
Aber selbst wenn es daran liegen würde, wäre evtl. folgendes möglich:?
Da das Licht immer nur kurz anbleibt, könnte man doch in der Automatisierung festlegen, dass der Lichtwert bereits vor z.B. 5 Minuten unter dem Wert 140 liegen musste. So würde das eingeschaltete Licht keinen Einfluss darauf haben.
I’ve read from another thread that Aqara Motion Sensor + Illuminance Sensor only updates the illuminance sensor when it detects motion AND after 1 hour of not detecting motion. In my opinion, it is not a good idea to use it to determine the light level.
Maybe what happen is the illuminance sensor still has the previous value when the light is ON - so the illuminance sensor update is not quick enough when the automation is triggered.
Just a suggestion, it is better to have a separate sensor in another place that is not affected by lights turning ON/OFF. That way, the sensor can truly measure the illuminance level based on the light from the sun.
In the mean time, you can use Sun Elevation Condition to determine the light level (although not very accurate).
I did not use default action as the motion sensor can sometimes turn to OFF even though you are still in the room (but not much movement) - and as soon as you move it will trigger to ON. If that happens, the condition of light is OFF is not satisfied, then it will use the default action (turning the light off before 20 seconds of no motion) which is not suppose to happen.