Using a Binary Sensor in an automation

I’ve setup a binary sensor that combines two motion sensors. I can see it working (shows on/off states), but that control doesn’t show up as a sensor in the automation devices list. How can I use this in an automation to trigger an event?

  - name: "Kitchen & Dining Room Motion" 
    device_class: motion
    unique_id: kitchen_dining_room_motion
    icon: mdi:motion-sensor
    state: "{{ is_state('binary_sensor.kitchen_motion_sensor_occupancy', 'on') or is_state('binary_sensor.dining_room_motion_sensor_occupancy', 'on') }}"

It is possible to make a group with your motion sensors. Group - Home Assistant

Ended up solving my own issue, it was a case using lower case state labels, rather than how they show up in the Lovelace UI

platform: state
entity_id: binary_sensor.kitchen_dining_room_motion
to: 'off'

Always check actual state value using developer tools page

Thanks for the tip, I haven’t used this feature, but as I’m getting into more complex areas, I think I should start to understand it!

Example below;

Also rather than creating another binary sensor, i would create a group, should give similar functionality but easier to manage

1 Like