Automatic turn on and off lights - strange behaviour


#1

I have automation rules for turning on a light after motion detection. The light should stay on for 3 minutes after the last motion detected. This works quit well except for… the lights start to dim and brighten after a second motion is detected at a moment between 20 seconds and 3 minutes after the first motion detected.

- alias: Licht in berging bij beweging
  initial_state: true
  trigger:
    - platform: state
      entity_id: binary_sensor.fibaro_system_fgms001_zw5_motion_sensor_sensor_2
      from: 'off'
      to: 'on'
    - platform: state
      entity_id: binary_sensor.visonic_z04
      from: 'off'
      to: 'on'
  condition:
    condition: or
    conditions:
      - condition: sun
        after: sunset
        after_offset: "-01:00:00"
      - condition: sun
        before: sunrise
        before_offset: "00:01:00"
  action:
    service: light.turn_on
    entity_id: light.lamp_berging

- alias: Licht in berging uit na 3 minuten
  initial_state: true
  trigger:
    platform: state
    entity_id: binary_sensor.fibaro_system_fgms001_zw5_motion_sensor_sensor_2
    to: 'off'
    for:
      minutes: 3 
  condition:
    condition: or
    conditions:
      - condition: sun
        after: sunset
        after_offset: "-01:00:00"
      - condition: sun
        before: sunrise
        before_offset: "00:01:00"
  action:
    service: light.turn_off
    entity_id: light.lamp_berging

Can anyone explain this behaviour so that I can learn?
Any tips for preventing this strange behaviour?


#2

Does you light have a transition defined?

Try adding a condition that the light is off to the first automation to stop it from executing if the light is already on.


#3

This post was flagged by the community and is temporarily hidden.


#4

Nee sorry, ik kan je daar niet mee helpen… ik heb een visonic alarm


#5

oke . maar weet je wel welke url ik daarvoor moet hebben. ik begin net met Home assitant . als die toegevoegd is als add-on dan redt ik mij wel. hoop ik!! ik weet niet goed hoe dat werkt met toevoegen.Preformatted text


#6

Silvrr, Unfortunately that didn’t solve it…


#7

Kijk eens hier: https://www.home-assistant.io/components/satel_integra/

Lijkt eenvoudig… onderstaand opnemen in configuration.yaml

# Example configuration.yaml entry
satel_integra:
  host: IP_ADDRESS

#8

bedankt dat je wil helpen. ik snap er nog niet wat van, ga wel eert ff youtube`n . weet niet waar ik die file neer moet zetten. ik snap wel dat die gemaakt moet worden met word pad.


#9

Is the light a zwave light? Sometimes these can become directly connected outside home assistant and it can cause issues.


#10

The light is a simple ClickOnClickOff light, the sensor is a Fibaro Motion Sensor (zwave)