Updated Blueprint to work with Sunricher ZG2835.
blueprint:
name: Sunricher ZG2835 — On/Off + Dim via Level (no groups, clean)
description: >
Control a light with the Sunricher ZG2835 over ZHA using only:
- On / Off
- Dim via Level cluster: move_to_level_with_on_off (and move_to_level)
Maps the reported Zigbee level (0–254) directly to HA brightness (clamped to ≥1).
domain: automation
input:
remote:
name: Sunricher remote
description: The ZG2835 device to use for this automation
selector:
device:
entity:
- integration: zha
filter:
- manufacturer: Sunricher
model: ZG2835
integration: zha
target_light:
name: Light to control
description: The light to control with the remote
default: {}
selector:
target:
entity:
- domain: light
mode: single
trigger:
# ON / OFF
- platform: event
id: turn_off
event_type: zha_event
event_data:
device_id: !input remote
command: "off"
- platform: event
id: turn_on
event_type: zha_event
event_data:
device_id: !input remote
command: "on"
# DIMMING via Level cluster (what your log shows)
- platform: event
id: level_with_on_off
event_type: zha_event
event_data:
device_id: !input remote
command: "move_to_level_with_on_off"
- platform: event
id: level_no_on_off
event_type: zha_event
event_data:
device_id: !input remote
command: "move_to_level"
action:
- choose:
# Set brightness to the provided level (0–254) -> clamp to 1..255
- conditions:
- condition: trigger
id: level_with_on_off
sequence:
- service: light.turn_on
target: !input target_light
data:
brightness: >-
{% set lvl = trigger.event.data.params.level | int %}
{{ [1, lvl] | max }}
- conditions:
- condition: trigger
id: level_no_on_off
sequence:
- service: light.turn_on
target: !input target_light
data:
brightness: >-
{% set lvl = trigger.event.data.params.level | int %}
{{ [1, lvl] | max }}
# ON
- conditions:
- condition: trigger
id: turn_on
sequence:
- service: light.turn_on
target: !input target_light
# OFF
- conditions:
- condition: trigger
id: turn_off
sequence:
- service: light.turn_off
target: !input target_light