Smart Home Automation Forum

Full Version: Xiaomi zigbee switch configure for home assistant by Zigbee2mqtt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
sensor:
  - platform: mqtt
    name: Voltage
    state_topic: "zigbee2mqtt/0x00158d00067ec29e"
    value_template: "{{ value_json.battery }}"
    unit_of_measurement: "%"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_available: "online"
    payload_not_available: "offline"
    qos: 0
    device_class: battery

  - platform: mqtt
    name: signal
    state_topic: "zigbee2mqtt/0x00158d00067ec29e" 
    value_template: "{{ value_json.linkquality }}"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_available: "online"
    payload_not_available: "offline"
    qos: 0
    device_class: signal_strength

  - platform: mqtt
    name: click
    state_topic: "zigbee2mqtt/0x00158d00067ec29e"
    value_template: "{{ value_json.click }}"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_available: "online"
    payload_not_available: "offline"
ID need replace with your device. such as '0x00158d00067ec29e'