First contact between Zigbee devices

Now that I am the proud owner of a working Z2M installation with a whopping two devices…

Can anyone help me understand how I get my Zigbee enabled motion sensor to switch on my Zigbee enabled light bulb, please?

If it’s of any help, it’s an Aeotec/Samsung SmartThings motion sensor (2018) and a Philips Hue (White) bulb.

I can see from the ‘state’ tab (for the motion sensor) that the field for ‘occupancy’ changes from ‘false’ to ‘true’ when a flap my arms in the vicinity of it.

In the usual automation page in home assistant.

1 Like

Replace the entities with yours.

Example:

- id: '1567689065684'
  alias: Licht badkamer aan
  description: Licht badkamer aan
  trigger:
  - entity_id: binary_sensor.ikeapir_occupancy
    platform: state
    to: 'on'
  condition:
  - condition: template
    value_template: '{{ state_attr("sun.sun", "elevation") < 5 }}'
  action:
  - data:
      entity_id: light.lichtbadkamer
    service: light.turn_on
  mode: restart

1 Like

Thanks folks :slight_smile:

I have a bit of cleaning up to do, it seems… My devices are now listed as old connections so I guess I have to remove them and polish up the HA a bit. :slight_smile:

Awesome avatar, BTW, @francisp … I recognise it well :slight_smile:

1 Like