Philips hue motion sensor no detection of motion after firing

Hi guys and girls, I am trying to use home assistant on a raspberry pi with conbee stick to emulate the philips hue bridge and have a problem using the motion sensors working on an automation.

What I want: I go on my hallway, the sensor detects me and switches on the light. After 2 minutes the light should turn off and the sensor should be active again if another family members go the same way.

What I get:
First time the sensor detects me the light turns on. After 2 minutes of no motion detected, the light turn off as expected.
But after another few seconds my wife goes to the hallway, the sensor detects motion (I can see that in phoscon or HA) but the lights stay dark.

The log says no error or something else and I don’t know how long the sensor needs time to reload or what ever. Under hue bridge every motion turn on the light instantly but HA has a problem with that.

I used the inbuilt automation tool with: when sensor detects motion and lux is under xxx turn on light. If 2 minutes no motion turn it off.

Anyone an idea for a proper solution for me? It seems simple but hard to to so… Please help.

Are you sure the lux is still below the threshold when you pass by the motion sensor the second time? Also if you post the YAML for the automations we’d be able to help you better.

I have two settings for switching on the light. One for daytime between 7am and 7pm and a lux threshold under 30.

And one setting for nighttime between 7pm and 7am without a threshold because I thought that will cause trouble if the lamp lights up and the sensor thinks it is bright enough to switch.

Unfortunately the problem persists even in the nighttime when lux measurement is not a condition for the automation.
And the lux is still under the given threshold when I go through the hallway the second time. Yesterday I tested the configuration several times and every detection started the automation correctly but today in the morning it stopped working.
Even if I use no conditions for the automation it’s unreliable.
May be it has to do with the problem if have that the pi with HA and conbee sometimes isn’t reachable with third party apps or web browser as it seems to crash?

The part of the automations.yaml:

- id: '1573392018700'
  alias: Flur Unten Licht an
  description: ''
  trigger:
  - device_id: e26ade108a214bf28c3f4e9347287d18
    domain: binary_sensor
    entity_id: binary_sensor.flurunten
    platform: device
    type: motion
  condition:
  - below: '30'
    condition: numeric_state
    entity_id: sensor.flurunten
  - condition: and
    conditions:
    - after: 07:00
      before: '19:00'
      condition: time
  action:
  - alias: ''
    data:
      brightness: 255
      entity_id: light.flurunten
    service: light.turn_on
- id: '1573392064961'
  alias: Flur Unten Licht aus
  description: ''
  trigger:
  - device_id: e26ade108a214bf28c3f4e9347287d18
    domain: binary_sensor
    entity_id: binary_sensor.flurunten
    for:
      hours: 0
      minutes: 1
      seconds: 0
    platform: device
    type: no_motion
  condition: []
  action:
  - device_id: 6e955b3ba6414763844dd16c7ec65ba2
    domain: light
    entity_id: light.flurunten
    type: turn_off
  - data:
      entity_id: binary_sensor.flurunten
    service: homeassistant.update_entity
- id: '1573411802168'
  alias: 'Licht unten Nacht '
  description: ''
  trigger:
  - device_id: e26ade108a214bf28c3f4e9347287d18
    domain: binary_sensor
    entity_id: binary_sensor.flurunten
    platform: device
    type: motion
  condition:
  - after: '19:00'
    before: 07:00
    condition: time
  action:
  - alias: ''
    data:
      brightness: 10
      entity_id: light.flurunten
    service: light.turn_on

binary_sensor.flurunten is the hue motion sensor on my hallway,
sensor.flurunten is the hue sensor part for measuring the brightness,
and light.flurunten is, as name it says, the lamp.