Xiaomi Gateway 3 - Sonoff Button SNZB-01 (3 actions)

Sonoff Button SNZB-01 with Xiaomi Gateway 3

Basic blueprint for executing supported actions with the Sonoff Button SNZB-01 and Xiaomi Gateway 3 using original firmware.

Supports the following actions:

  • Single
  • Double
  • Hold

Requirements:

Blueprint Code

Click the badge to import this Blueprint: (needs Home Assistant Core 2022.2 or higher)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Or import this Blueprint by using the forum topic / Gist URL:

blueprint:
  name: Sonoff Button SNZB-01 with Xiaomi Gateway 3
  description: '
    ## Sonoff Button SNZB-01 with Xiaomi Gateway 3
    Basic blueprint for executing supported actions with the Sonoff Button SNZB-01 and
    Xiaomi Gateway 3 using default firmware.
    Supports the following actions:
    - Single
    - Double
    - Hold
    ### Requirements:
    - [Xiaomi Gateway 3 Integration][1] v2.0.3
    - Official Firmware for the Gateway
    - Paired Sonoff Button SNZB-01
    [1]: https://github.com/AlexxIT/XiaomiGateway3
    '
  domain: automation
  source_url: https://gist.github.com/WarC0zes/06727a85127381539b8e576af56ac929#file-sonoff_snzb01_for_xiaomi_gateway3-yaml  
  input:
    trigger_entity:
      name: Sonoff Button
      description: Choose Sonoff Button Action entity
      selector:
        entity:
          domain: sensor
          integration: xiaomi_gateway3
    single:
      name: Single
      description: Actions to one click
      default: []
      selector:
        action: {}
    double:
      name: Double
      description: Actions to double click
      default: []
      selector:
        action: {}
    hold:
      name: Hold
      description: Actions to hold click
      default: []
      selector:
        action: {}
variables:
  action: '{{ trigger.to_state.state }}'
trigger:
- platform: state
  entity_id: !input 'trigger_entity'
condition: []
action:
- choose:
  - conditions:
    - '{{ action == ''single'' }}'
    sequence: !input 'single'
  - conditions:
    - '{{ action == ''double'' }}'
    sequence: !input 'double'
  - conditions:
    - '{{ action == ''hold'' }}'
    sequence: !input 'hold'
  default: []
mode: queued
max_exceeded: silent
1 Like