I have the yaml code below working in a Home Assistant automation, however when pressing the buttons (it has 3 buttons) on the zigbee unit the results in the esp32 are randomly weird… lights coming on, but not as intended or correct brightness etc.
Therefore I figure I will try adding the zigbee button functionality currently in the automation directly into the esp32 yaml code.
Here’s the HA automation yaml code… that uses button 1 out of 3
alias: Bedroom Lights - Rainbow
description: ""
trigger:
- platform: device
domain: mqtt
device_id: f501bb73628ac7c2f2b115de0c19a330
type: action
subtype: 1_single
discovery_id: 0x804b50fffe21cd57 action_1_single
condition: []
action:
- service: light.turn_on
target:
entity_id: light.fastled_ws2812b_light
data:
effect: Rainbow Effect
brightness_pct: 90
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: light.turn_off
target:
entity_id: light.fastled_ws2812b_light
data: {}
mode: single
I figure it is a case of creating a binary sensor… but I am unsure how to add a zigbee button device with three buttons into a binary sensor in esphome?
Any tips to point me in the right direction greatly appreciated.