Automation Flickers Lights after 3 mins and occupancy does not work

Having lots of issues tryiing to get a good automation to work on Kitchen lights which are strip lights with the new Aqara Motion Sensor P1

I have Change mode to Parallel the Automation which as not really helped at all.

The Sensor is also suppose to have a occupancy on it so I thought to try that but the automation did not work at all, so no clue to why this also i snot working?

I do have FP2 sensors but not wanting them for this automation!

Can anyone give me any further help or tips that might prvent this from happening?

This is my Automation

Please copy and share the automation yaml correctly formatted for the forum.

Hope its formatted correctly thanks

alias: Kitchen Lights on
description: ""
trigger:
  - type: motion
    platform: device
    device_id: 793e3dc77bef44799b9062402e29cc0d
    entity_id: dce87703903b0acb64ae44ec328322e4
    domain: binary_sensor
    id: Lights-on
  - type: no_motion
    platform: device
    device_id: 793e3dc77bef44799b9062402e29cc0d
    entity_id: dce87703903b0acb64ae44ec328322e4
    domain: binary_sensor
    id: Lights-off
    for:
      hours: 0
      minutes: 3
      seconds: 0
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Lights-on
        sequence:
          - service: light.turn_on
            target:
              entity_id:
                - light.kitchen_led_1
                - light.controller_rgb_with_mic_5fe3d2
                - light.kitchen_led_2
            data: {}
      - conditions:
          - condition: trigger
            id:
              - Lights-off
        sequence:
          - service: light.turn_off
            target:
              entity_id:
                - light.kitchen_led_1
                - light.controller_rgb_with_mic_5fe3d2
                - light.kitchen_led_2
            data: {}
mode: parallel
max: 10

The lights can also have delays in the coming on too or I might have to wave my arms around to get the sensor to detect me again.

On looking at my old notes it mentions that I never installed an init file as it seems to work without it so this part I skipped!
not sure what that was about now as it was over 12 months ago. Think I installed this firmware from here:

ncp-uart-sw_EZNet6.10.3_V1.0.1.gbl

I also tried here too but it would not flash the Sonoff Zigbee Dongle-E!
zigbeeFirmware

But I have no clue which firmware version failed.

Hope this helps.

This is what it is doing!
https://imgur.com/zHoqiXh

Thanks for all the help! :slight_smile:

I’ve managed to figure out the issues why they were flikering!

This is the fault and what it was doing!

Maxcio Strip Lights

And I replaced the Power DC5 -24 on the lights, which stopped them frrom flashing!

Power DC5