Blueprint Sunricher ZG2835

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

Hello bartosss,

Thanks for contributing to the community with a new Blueprint.

I have a suggestion for you. Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.

Adding a MY link for this Blueprint to your top post would help them a lot.
Here is the link to make that.

Create a link – My Home Assistant