Skip to content

Configuration examples

FHA edited this page Apr 9, 2018 · 6 revisions

Please note that it is safer to put all address between double-quote to avoid problem with numerical only device addresses.

Xiaomi temperature sensors

sensor:
  - platform: zigate
    name: 'LivingRoom Sensor'
    address: "a1b201"
    default_state: temperature
    default_unit: '°C'

  - platform: template
    sensors:
      pressure1:
        friendly_name: 'LivingRoom Atmospheric Pressure'
        unit_of_measurement: 'mb'
        value_template: '{{ states.sensor.livingroom_sensor.attributes.pressure }}'

Xiaomi presence detectors

switch:
    - platform: zigate
      name: 'presence_sensor'
      address: "aaaa01"
      default_state: 'event'
      type: 'momentary'

Example automation for detection

- action:
  - data:
      message: automation title
    service: notify.notify
  alias: automation alias
  condition: []
  id: 'xxxxxx'
  trigger:
  - entity_id: switch.presence_sensor
    from: 'off'
    platform: state
    to: 'on'

Xiaomi door sensors

switch:
    - platform: zigate
      name: 'Main Door'
      address: "bbbb01"
      default_state: 'state'
      inverted: 'yes'

Xiaomi smart switch

switch:
  - platform: zigate
    name: 'Switch01'
    address: "b01701"

Xiaomi Aqara push button (only single click supported)

switch:
  - platform: zigate
    name: 'Switch01'
    address: "f5c901"
    autotoggle_delay: 2
    default_state: 'state'
    type: 'toggle'

Light

light:
  - platform: zigate
    name: 'Light'
    address: "6e8e01"
    light_type: 'dual-white'
    default_state: 'event'

Osram plug

switch:
  - platform: zigate
    name: 'Switch01'
    address: "b01701"

related automation

 action:
  - service: switch.toggle
    entity_id: switch.Switch01