luar123 / zigbee_esphome

External zigbee component
18 stars 0 forks source link

ESPHome ZigBee external component

External ZigBee component for ESPHome.

Features

Limitations

ToDo List (Short-Mid term)

Not planed (feel free to submit a PR)

Notes

Usage

Include external component:

external_components:
  - source: github://luar123/zigbee_esphome
    components: [ zigbee ]

zigbee:
  ...

Configuration variables:

[Todo]

Example:

zigbee:
  id: "zb"
  endpoints:
    - num: 1
      device_type: COLOR_DIMMABLE_LIGHT
      clusters:
        - id: ON_OFF
          attributes:
            - id: 0
              type: bool
              on_value:
                then:
                  - light.control:
                      id: light_1
                      state: !lambda "return (bool)x;"
        - id: LEVEL_CONTROL
          attributes:
            - id: 0
              type: U8
              on_value:
                then:
                  - light.control:
                      id: light_1
                      brightness: !lambda "return ((float)x)/255;"
    - device_type: TEMPERATURE_SENSOR
      num: 2
      clusters:
        - id: REL_HUMIDITY_MEASUREMENT
          attributes:
            - id: 0
              type: U16
              value: 200
        - id: TEMP_MEASUREMENT
          attributes:
            - id: 0x0
              type: S16
              value: 100
  on_join:
    then:
      - logger.log: "Joined network"

Actions

Examples:

    on_value:
      then:
        - zigbee.setAttr:
            id: zb
            endpoint: 2
            cluster: REL_HUMIDITY_MEASUREMENT
            attribute: 0x0
            value: !lambda "return x*100;"
    on_press:
      then:
        - zigbee.report: zb

Example Zigbee device

ESPHome Zigbee using only dev board or additionally AHT10 Temperature+Humidity Sensor.

Hardware Required

Build ESPHome Zigbee sensor

How to contribute

Please submit PRs targeting the zigbee external component to https://github.com/luar123/esphome/tree/zigbee

PRs targeting the examples or documentation should be submitted here.

If looking to contribute to this project, then suggest follow steps in these guides + look at issues in Espressif's ESP Zigbee SDK repository:

External documentation and reference

Note! The official documentation and reference examples for the ESP Zigbee SDK can currently be obtained from Espressif: