Forked from hugalafutro/Z2M_Hue_Dimmer_Switch_v2.yaml
Last active
November 16, 2023 14:35
-
-
Save jhjelmar/dd1df13ce6a855d819a78cc02c9e4122 to your computer and use it in GitHub Desktop.
Z2M_Hue_Dimmer_Switch_v3.yaml
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: Zigbee2Mqtt Hue Dimmer Switch control v3 | |
description: '' | |
domain: automation | |
input: | |
dimmer_action: | |
name: Dimmer MQTT topic | |
description: 'type in your Dimmer MQTT topic (i.e. zigbee2mqtt/Dimmer/action)' | |
selector: | |
text: | |
action_on_press: | |
name: on_press | |
description: select action to run when you press ON | |
default: [] | |
selector: | |
action: | |
action_off_press: | |
name: off_press | |
description: select action to run when you press OFF | |
default: [] | |
selector: | |
action: | |
action_up_press: | |
name: up_press | |
description: select action to run when you press UP | |
default: [] | |
selector: | |
action: | |
action_down_press: | |
name: down_press | |
description: select action to run when you press DOWN | |
default: [] | |
selector: | |
action: | |
action_on_hold: | |
name: on_hold | |
description: select action to run when you hold ON | |
default: [] | |
selector: | |
action: | |
action_off_hold: | |
name: off_hold | |
description: select action to run when you hold OFF | |
default: [] | |
selector: | |
action: | |
action_up_hold: | |
name: up_hold | |
description: select action to run when you hold UP | |
default: [] | |
selector: | |
action: | |
action_down_hold: | |
name: down_hold | |
description: select action to run when you hold DOWN | |
default: [] | |
selector: | |
action: | |
trigger: | |
- platform: mqtt | |
topic: !input dimmer_action | |
payload: on_press | |
id: dimmer_on | |
- platform: mqtt | |
topic: !input dimmer_action | |
id: dimmer_off | |
payload: off_press | |
- platform: mqtt | |
topic: !input dimmer_action | |
id: dimmer_up | |
payload: up_press | |
- platform: mqtt | |
topic: !input dimmer_action | |
id: dimmer_down | |
payload: down_press | |
- platform: mqtt | |
topic: !input dimmer_action | |
id: dimmer_on_hold | |
payload: on_hold | |
- platform: mqtt | |
topic: !input dimmer_action | |
payload: off_hold | |
id: dimmer_off_hold | |
- platform: mqtt | |
topic: !input dimmer_action | |
id: dimmer_up_hold | |
payload: up_hold | |
- platform: mqtt | |
topic: !input dimmer_action | |
payload: down_hold | |
id: dimmer_down_hold | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: dimmer_on | |
sequence: | |
!input action_on_press | |
- conditions: | |
- condition: trigger | |
id: dimmer_off | |
sequence: | |
!input action_off_press | |
- conditions: | |
- condition: trigger | |
id: dimmer_up | |
sequence: | |
!input action_up_press | |
- conditions: | |
- condition: trigger | |
id: dimmer_down | |
sequence: | |
!input action_down_press | |
- conditions: | |
- condition: trigger | |
id: dimmer_on_hold | |
sequence: | |
!input action_on_hold | |
- conditions: | |
- condition: trigger | |
id: dimmer_off_hold | |
sequence: | |
!input action_off_hold | |
- conditions: | |
- condition: trigger | |
id: dimmer_up_hold | |
sequence: | |
!input action_up_hold | |
- conditions: | |
- condition: trigger | |
id: dimmer_down_hold | |
sequence: | |
!input action_down_hold | |
default: [] | |
mode: restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to non-legacy mqtt payload using underscore.
Added default values.