A simple configuration example to add and control ZigBee devices paired to a Zigate, an open source ZigBee concentrator.
Using the Zigate with Home Assistant requires to install pyzigate
(GitHub) and copy the homeassistant_zigate
component within the custom_components
in Home Assistant's configuration folder (GitHub).
- 1x Zigate
- 2x Philips white bulbs
- 1x Xiaomi Aqara switch
- 1x Xiaomi Aqara door sensor
- 1x Xiaomi Aqara temperature/humidity/pressure sensor
configuration.yaml :
homeassistant:
...
switch: !include switches.yaml
light: !include lights.yaml
sensor: !include sensors.yaml
automation: !include automations.yaml
Configuration for the Xiaomi Aqara door sensor :
switches.yaml :
- platform: zigate
name: 'Door'
address: XXXX01
default_state: 'state'
inverted: 'yes'
Configuration for the two white Philips Hue bulbs :
lights.yaml :
- platform: zigate
name: 'Bedside'
address: XXXX0b
light_type: 'white'
default_state: 'event'
- platform: zigate
name: 'Ceiling'
address: XXXX0b
light_type: 'white'
default_state: 'event'
Note : Philips uses the 0b
cluster for their bulbs!
Configuration for the Xiaomi Aqara temperature/humidity/pressure sensor and switch :
sensors.yaml :
- platform: zigate
name: 'Ceiling Switch'
address: XXXX01
default_state: 'state'
- platform: zigate
name: 'Temperature'
address: XXXX01
default_state: temperature
default_unit: '°C'
- platform: zigate
name: 'Humidity'
address: XXXX01
default_state: humidity
default_unit: '%'
- platform: zigate
name: 'Pressure'
address: XXXX01
default_state: pressure
default_unit: 'mb'
Automation example to handle a single/double click on the Xiaomi Aqara switch :
automations.yaml :
- alias: 'Ceiling Switch - Single Click'
hide_entity: True
trigger:
entity_id: sensor.ceiling_switch
platform: state
to: 'off-release'
action:
service: light.toggle
data:
entity_id: light.ceiling
- alias: 'Ceiling Switch - Double Click'
hide_entity: True
trigger:
entity_id: sensor.ceiling_switch
platform: state
to: 'multi_2'
action:
service: light.toggle
data:
entity_id: light.bedside