Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106357

Light level automation

$
0
0

Hi! I’m using Home Assistant on Rpi4. I cant get my light level dependant automation to work properly.

I want some lights to turn on when my Philips Hue Motion Sensor detects light below 350 lux for 10 minutes.
As an example: I go to bed at night, light level is 1 lux. A car drives by and it’s lights bring light level over 350 lux, just for a second or two. Now the automation should not go off. It has to to be over 350 lux for 10 minutes. But no!
After 10 minutes the automation will go off and turn on my lights.

I have created a binary_sensor wich turns off below 350 lux to trig the automation. Earlier I had the automation to trig from numeric_state direct from the Hue sensor. Same result though.
Automation made from front end.

I must be doing some simple beginners mistake?

`

alias: Tänd lampor skymning
  trigger:
  - platform: state
    entity_id: binary_sensor.over_350_lux
    to: 'off'
    for: 00:10:00
  condition: []
  action:
  - entity_id: light.tv_rum_flatad_lampa,light.tv_rum_lampa,light.ytterdorr,light.golvlampa,light.tv_rum_fonsterlampa,switch.koket_fonster,switch.kontor_fonsterlampa,switch.julias_fonsterlampa,light.lilla_fonsterlampan,light.vita_bollenlampa
    service: homeassistant.turn_on
  mode: restart
- platform: template
  sensors:
    over_350_lux:
      friendly_name: "Dagsljus"
      device_class: light
      value_template: "{{ states('sensor.lightlevel_22')|float > 350 }}"
      icon_template: >-
          {% if is_state("binary_sensor.over_350_lux", "on") %}
            mdi-weather-sunny
          {% else %}
            mdi:weather-sunset-down
          {% endif %}

`

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106357

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>