Same rules essentially, one works, the other not

Transitioning from HA to OH. I have Lutron Caseta switches installed, LEAP binding working fine with Smart Bridge 2. I have z-wave motion sensors installed in various locations, meant to turn on the lights in those areas when presence is detected.

All motion sensors are same brand, same config:

So, here we go. Motion detectors have the same items, channels, etc. as do the Lutron switches.

This one works:

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Pantrymotionsensor_MotionAlarm
      state: ON
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: ON
      itemName: KitchenPantry_SwitchState
    type: core.ItemCommandAction

However, scripted the same, this one does not:

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Halfbathmotionsensor_MotionAlarm
      state: ON
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      command: ON
      itemName: HalfBathroomLights_SwitchState
    type: core.ItemCommandAction

Is there any message in the logs?

What’s happening if you manually execute the rules?

What are the types of the two items? Since bindings use Contact Items for motion sensors while others use Switches? Only Switches can receive ON, while a Contact can receive OPEN.

They work when I click on…this is why I’m befuddled.

The Lutron switches are exactly that, switches. On or off.

Think I have it. Going through the log, the unresponsive motion sensors shows “NULL”. Any way to correct?

Fix the binding or channel configuration, most likely. Over to you for details of zwave devices …