Home Assistant Config
YAML examples and ZHA / Zigbee2MQTT configuration for Smartify installations.
ZHA (Zigbee Home Automation)
ZHA is built into Home Assistant — no additional software needed. Recommended for most installations.
Enable: Settings → Devices & Services → Add Integration → Zigbee Home Automation
Select the gateway's serial port or IP address and click Submit.
Channel selection
# configuration.yaml
zha:
zigpy_config:
network:
channel: 15 # avoid channels 1, 6, 11 which overlap common WiFi bandsAutomation example — motion-triggered light
alias: "Motion — Living Room Light On"
trigger:
- platform: state
entity_id: binary_sensor.living_room_motion
to: "on"
action:
- service: light.turn_on
target:
entity_id: light.living_room_switchZigbee2MQTT
Zigbee2MQTT exposes devices over MQTT and gives more control over device configuration.
Install via the Zigbee2MQTT add-on in Home Assistant. Minimal configuration.yaml:
serial:
port: /dev/ttyUSB0
advanced:
network_key: GENERATE
pan_id: GENERATE
frontend:
enabled: truePermit join via MQTT
mosquitto_pub -t zigbee2mqtt/bridge/request/permit_join -m '{"value": true, "time": 60}'Useful automations
| Automation | Trigger | Action |
|---|---|---|
| Away mode | No motion for 10 min | Turn off all lights |
| Morning scene | Time 07:00 | Lights at 40% |
| AC control | Temp sensor > 28°C | IR blaster: AC on 24°C |
| Night mode | Time 22:00 | Dim all lights to 10% |