Automatic turn on and off lights - strange behaviour

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?

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.

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

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

Silvrr, Unfortunately that didn’t solve it…

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

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.

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

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