Sonoff SN-ZB03
Using Tasmota and MQTT
MQTT Information Sent to SENSOR
{"ZbReceived":{"0x6841":{"Device":"0x6841","0500?00":"000000000000","ZoneStatusChange":0,"Occupancy":0,"Endpoint":1,"LinkQuality":105}}}
The Occupancy
is used for motion detection.
- binary_sensor:
- name: Sonoff Occupancy
unique_id: zb_sonoff_occupancy
object_id: sonoff_occupancy
state_topic: "tele/bridge_tasmota_2D251C/SENSOR"
value_template: "{{ value_json.ZbReceived['0x6841'].Occupancy }}"
device_class: "occupancy"
expire_after: 86400
payload_on: 1
payload_off: 0
device: &sonoff_motion_device_info
identifiers: [sonoff_0x6841]
configuration_url: http://10.10.120.16:1883
manufacturer: Sonoff
model: "0x6841"
name: "Sonoff Motion Sensor"
icon: mdi:motion-sensor
The motion sensor is a binary sensor
Since motion is a binary sensor, it needs a payload_on
and payload_off
. In this case 0 and 1.