Automations using ZHA /conbee/ motion sensors dont work?

I recently swapped from using deconz to using ZHA. Everything seems to have gone fine except I cant seem to get my automations to work with the binary sensors in my philips motion sensors.

I can watch the states of “binary_sensor.samjin_motion_aec00c01_ias_zone” and see that when it detects motion it toggles from off to on. However, my automations aren’t acting on this like they used to with deconz. I have attached the Automation Config generated with the motion sensor light blueprint. Does anyone see a reason this fails now?

mode: restart
max_exceeded: silent
trigger:
  platform: state
  entity_id: binary_sensor.samjin_motion_aec00c01_ias_zone
  from: 'off'
  to: 'on'
action:
  - alias: Turn on the light
    service: light.turn_on
    target:
      entity_id: switch.garage_hall
  - alias: Wait until there is no motion from device
    wait_for_trigger:
      platform: state
      entity_id: binary_sensor.samjin_motion_aec00c01_ias_zone
      from: 'on'
      to: 'off'
  - alias: Wait the number of seconds that has been set
    delay: 181
  - alias: Turn off the light
    service: light.turn_off
    target:
      entity_id: switch.garage_hall
id: '1637782542036'
alias: Motion-activated Light
description: ''

So i stopped using the blueprint because im thinking the light.turn_on service wont work with my switch entity.

I also stopped using the state trigger for off to on, and instead have am now specifying a device trigger where the device is “motion sensor a” and the trigger is “motion sensor started detecting motion”.

It works now, however I dont fully understand why it wont work watching the state transition from off to on like it used to with deconz?

oh well.

This must be

  - alias: Turn off the light
    service: switch.turn_off
    target:
      entity_id: switch.garage_hall

Same a little bit higher

FYI, you can create a light from a switch:.