I’m not sure if this will be a useful post or not, but I thought I would post anyway since when I looked for information in the forums and in the Zigbee2MQTT documentation I didn’t see much to guide me to examples of what I wanted to do.
I picked up two Linkind ZS230002’s on Amazon a few years ago and managed to get them working in zha with a bit of work. Then I migrated to ZB2MQTT when I did a reinstall of HA and discovered I couldn’t use the step feature (up and down buttons) properly. The best I could do was use on/off and if either up or down buttons were pressed trigger a single action. Annoying.
alias: 00 - Multi-Button 01 Test
description: ""
trigger:
- platform: device
domain: mqtt
device_id: (redacted)
type: action
subtype: "on"
discovery_id: (redacted) action_on
id: "on"
- platform: device
domain: mqtt
device_id: (redacted)
type: action
subtype: "off"
discovery_id: (redacted) action_off
id: "off"
- platform: state
entity_id:
- sensor.multi_button_01_action
attribute: action
id: brightness_move
from: brightness_move_to_level
Well, in review of zigbee2mqtt documentation on the device, noted the Options section containing information on simulated_brightness. In ZB2MQTT, for the device under “Settings (specific)” I saw the simulated_brightness control. Before interacting with this setting, under “State” I had something similar to the following (this is from my second button)
{
"battery": 43,
"battery_low": false,
"linkquality": 78,
"voltage": 2600
}
After setting the simulated_brightness to the default values provided in the device entry in ZB2MQTT documentation, (delta: 20, interval: 200) I saw the following:
{
"battery": 73,
"brightness": 13,
"linkquality": 78
}
This change seemed to enable a new attribute in HA for the device, “brightness”. With this new attribute enabled I played with the device up/down buttons while monitoring the state of the device in Dev Tools. I saw that the brightness attribute had the following values: 13, 64, 127, 191, and 255. Armed with this new info, in the UI I attempted to create a trigger with the following YAML result. (Tried to screenshot but with new user status, I’m restricted to a single upload)
- platform: state
entity_id:
- sensor.multi_button_01_action
id: "255"
attribute: brightness
to: "255"
This configuration did not work as a trigger. After a few weeks of back and forth with this, this morning I checked the yaml view and removed the quotation from the ‘to’ value and success I was able to use the step values as triggers in the automation!
Hope this saves someone else the time and frustration! Cheers!