Created
September 26, 2022 20:56
-
-
Save NigelVanHattum/2b2604bc4b8ceb865e6468f3d119a099 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: Zigbee2Mqtt Hue Dimmer Switch control | |
description: 'Based on https://gist.github.com/hugalafutro/c34ec70b688c9065ed0054b33d3f32a6' | |
domain: automation | |
input: | |
dimmer_action: | |
name: Dimmer Switch Action sensor | |
description: 'Select your "sensor.dimmer_action" entity that will control this automation.' | |
selector: | |
entity: | |
domain: sensor | |
integration: mqtt | |
action_on_press: | |
name: on-press | |
description: select action to run when you press I | |
selector: | |
action: | |
action_off_press: | |
name: off-press | |
description: select action to run when you press O | |
selector: | |
action: | |
action_up_press: | |
name: up-press | |
description: select action to run when you press UP | |
selector: | |
action: | |
action_down_press: | |
name: down-press | |
description: select action to run when you press DOWN | |
selector: | |
action: | |
action_on_hold: | |
name: on-hold | |
description: select action to run when you hold I | |
selector: | |
action: | |
action_off_hold: | |
name: off-hold | |
description: select action to run when you hold O | |
selector: | |
action: | |
action_up_hold: | |
name: up-hold | |
description: select action to run when you hold UP | |
selector: | |
action: | |
action_down_hold: | |
name: down-hold | |
description: select action to run when you hold DOWN | |
selector: | |
action: | |
trigger: | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "on-press" | |
attribute: action | |
to: on-press | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "off-press" | |
attribute: action | |
to: off-press | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "up-press" | |
attribute: action | |
to: up-press | |
- platform: state | |
entity_id: !input dimmer_action | |
attribute: action | |
id: "down-press" | |
attribute: action | |
to: down-press | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "up-hold" | |
attribute: action | |
to: up-hold | |
attribute: action | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "down-hold" | |
attribute: action | |
to: down-hold | |
attribute: action | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "on-hold" | |
attribute: action | |
to: on-hold | |
attribute: action | |
- platform: state | |
entity_id: !input dimmer_action | |
id: "off-hold" | |
attribute: action | |
to: off-hold | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: "on-press" | |
sequence: | |
!input action_on_press | |
- conditions: | |
- condition: trigger | |
id: "off-press" | |
sequence: | |
!input action_off_press | |
- conditions: | |
- condition: trigger | |
id: "up-press" | |
sequence: | |
!input action_up_press | |
- conditions: | |
- condition: trigger | |
id: "down-press" | |
sequence: | |
!input action_down_press | |
- conditions: | |
- condition: trigger | |
id: "on-hold" | |
sequence: | |
!input action_on_hold | |
- conditions: | |
- condition: trigger | |
id: "off-hold" | |
sequence: | |
!input action_off_hold | |
- conditions: | |
- condition: trigger | |
id: "up-hold" | |
sequence: | |
!input action_up_hold | |
- conditions: | |
- condition: trigger | |
id: "down-hold" | |
sequence: | |
!input action_down_hold | |
default: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment