Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lesson18 - add ZigBee PIR motion sensor to auto control light in home assistant
#1

1. SONOFF SNZB-03 configure for home assistant by Zigbee2mqtt

sensor:
  - platform: mqtt
    name: pir-state
    state_topic: "zigbee2mqtt/0x00124b00251e530f"
    value_template: "{{ value_json.occupancy }}"   

Note: ID need replace with your device. such as '0x00124b00251e530f'

2. create a new automation:

create automation-1 (turn on light)
-------------------------------------------
Trigger type: State
Entity: pir-state
To: True


Actions:
Action type: Call service
Service: Switch:Switch: Turn on
+ Choose entity

create automation-2 (turn off light)
------------------------------------------
Trigger type: State
Entity: pir-state
To: False


Actions:
Action type: Call service
Service: Switch:Switch: Turn off
+ Choose entity
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)