What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| Model | model | HK-DIM, ZG9030A-MW | settable |
| Light pwm frequency | light_pwm_frequency | 0…65535 | settable |
| Brightness curve | brightness_curve | linear, gamma_logistics_1_5, gamma_logistics_1_8 | settable |
| Start up on off | start_up_on_off | last_state, on, off | settable |
| Motion sensor light duration | motion_sensor_light_duration | s · 0…65535 | settable |
| Motion sensor light sensitivity | motion_sensor_light_sensitivity | 0…255 | settable |
| Motion sensor working mode | motion_sensor_working_mode | automatic, manual | settable |
| Motion sensor sensing distance | motion_sensor_sensing_distance | 0…15 | settable |
| Motion sensor microwave switch | motion_sensor_microwave_switch | on, off | settable |
| Motion sensor onoff broadcast | motion_sensor_onoff_broadcast | on, off | settable |
| Motion sensor light state | motion_sensor_light_state | on, off | settable |
| Motion sensor in pwm brightness | motion_sensor_in_pwm_brightness | lux · 0…1000 | settable |
| Motion sensor in pwm output | motion_sensor_in_pwm_output | 0…254 | settable |
| Motion sensor leave pwm output | motion_sensor_leave_pwm_output | % · 0…100 | settable |
| Motion sensor leave delay | motion_sensor_leave_delay | s · 0…65535 | settable |
| Motion sensor pwm output after delay | motion_sensor_pwm_output_after_delay | % · 0…100 | settable |
| Linearity error ratio lux | linearity_error_ratio_lux | 100…10000 | settable |
| Fixed deviation lux | fixed_deviation_lux | -100…100 | settable |
| Light | state, brightness | on / off, brightness | settable |
| Light effect | effect | blink, breathe, okay, channel_change, finish_effect, stop_effect | settable |
| After power loss | power_on_behavior | off, on, toggle, previous | settable |
| Motion (2) | occupancy_2 | — | read only |
| Illuminance (3) | illuminance_3 | lx | read only |
| Action (button press) | action | on, off, toggle, brightness_move_to_level, brightness_move_up, brightness_move_down, brightness_step_up, brightness_step_down … | read only |
MQTT: state and commands
Zigbee2MQTT publishes the device state to zigbee2mqtt/my_device (my_device is the name you give the device). An example message:
{
"model": "HK-DIM",
"light_pwm_frequency": 32768,
"brightness_curve": "linear",
"start_up_on_off": "last_state",
"motion_sensor_light_duration": 32768,
"motion_sensor_light_sensitivity": 128,
"motion_sensor_working_mode": "automatic",
"motion_sensor_sensing_distance": 8,
"motion_sensor_microwave_switch": "on",
"motion_sensor_onoff_broadcast": "on",
"motion_sensor_light_state": "on",
"motion_sensor_in_pwm_brightness": 500,
"motion_sensor_in_pwm_output": 127,
"motion_sensor_leave_pwm_output": 50,
"state": "ON",
"brightness": 180,
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state":"ON","brightness":180}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state":"OFF","transition":2}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"model":"ZG9030A-MW"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"brightness_curve":"gamma_logistics_1_5"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"start_up_on_off":"on"}'
Watch the topics live from the browser: MQTT client.
Home Assistant automation example
Zigbee2MQTT creates Home Assistant entities from the device name. If it is called my_device, an automation in automations.yaml can look like this:
- alias: "Light at sunset"
mode: single
triggers:
- trigger: sun
event: sunset
offset: "-00:15:00"
actions:
- action: light.turn_on
target:
entity_id: light.my_device
data:
brightness_pct: 70
Check the YAML: YAML checker.
How to pair it
- In Zigbee2MQTT click Permit join.
- Put the device in pairing mode: usually a long press of the reset button (5–10 s) until the LED blinks; bulbs: switch the power off and on 5–6 times.
- Keep the device close to the coordinator or a router while pairing.
- Give it a clear name: MQTT topics and Home Assistant entities are built from it.
Exact procedure and model notes: the device page in the Zigbee2MQTT docs. No coordinator yet: coordinator picker.