Created
May 26, 2023 17:09
-
-
Save jandolejs/062f41aff34d0d4d7cfed19f509f4d82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Switch Aqara D1 | |
domain: automation | |
input: | |
switch: | |
name: Button switch Device | |
selector: | |
entity: | |
domain: sensor | |
multiple: true | |
single: | |
name: Single | |
default: [] | |
selector: | |
action: {} | |
double: | |
name: Double | |
default: [] | |
selector: | |
action: {} | |
hold: | |
name: Hold | |
default: [] | |
selector: | |
action: {} | |
mode: queued | |
max_exceeded: silent | |
trigger: | |
- platform: state | |
entity_id: !input 'switch' | |
action: | |
- variables: | |
command: '{{ trigger.to_state.state }}' | |
- choose: | |
- conditions: | |
- '{{ command == ''single'' }}' | |
sequence: !input single | |
- conditions: | |
- '{{ command == ''double'' }}' | |
sequence: !input double | |
- conditions: | |
- '{{ command == ''hold'' }}' | |
sequence: !input hold |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment