I am a bit confused about my automation.
My automation should turn on some lights if the light is on in the living room and if the lux is under a given value. However, when value states is reached nothing happens.
When I click run automation it runs as it should, but it does not fire automatically.
Automation looks like this:
- alias: Skru på Blomsterlampe, Leimu og stue hvis det er under x antall lux
trigger:
platform: numeric_state
entity_id: sensor.fibaro_system_fgms001_zw5_motion_sensor_luminance
above: 90
below: 80
condition:
condition: numeric_state
entity_id: light.fibaro_system_fgd212_dimmer_2_level_7
above: 90
below: 80
action:
- service: homeassistant.turn_on
entity_id:
- switch.fibaro_system_blomsterlampe
- switch.fibaro_system_fgwpe_f_wall_plug_gen5_switch_3
- service: light.turn_on
entity_id:
- light.le_klint_stalampe
- light.trapp_2
data:
brightness: 140
In advance thank you for looking into this for me!
Hold on I can see something not correct. It should not sate the above or below on entity_id: light.fibaro_system_fgd212_dimmer_2_level_7 this should only state if on.
Thanks! But it sill does not want to fire.
I am just looking for it to turn on lights once it hits a lux under 90 ish. So in order to see if the automation is working or not I cover the sensor. But this automation remains still.
Well if I cover it, it will drop lower than 80. Maybe I should remove above and only use below? The lights should turn on when the lux turns 80 or lower.
You’ve defined a narrow range of lux level (between 80 and 90) thereby making it challenging to test the automation. I agree you should simply set it to below: 80. It will make it easier to test the automation’s triggering.
FYI, my front porch and garage lanterns are set to turn on when daylight luminance falls below 40 lux for at least 3 minutes. Adding the “for:” qualifier insures light has constantly and stably diminished. Without it, there was occasional ‘bounce’ in the values and lights would occasionally turn on and off too much.
- alias: Skru på Blomsterlampe, Leimu og stue hvis det er under x antall lux
trigger:
platform: numeric_state
entity_id: sensor.fibaro_system_fgms001_zw5_motion_sensor_luminance
below: 80
for:
minutes: 3