Last active
December 19, 2023 09:34
-
-
Save toabi/2469bf3296a11474795152609b9fcb44 to your computer and use it in GitHub Desktop.
My HA Blueprints
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: Appliance has finished | |
description: Do something when an appliance (like a washing machine or dishwasher) | |
has finished as detected by a power sensor. | |
domain: automation | |
input: | |
power_sensor: | |
name: Power Sensor | |
description: Power sensor entity (e.g. from a smart plug device). | |
selector: | |
entity: | |
domain: sensor | |
starting_threshold: | |
name: Starting power threshold | |
description: Power threshold above which we assume the appliance has started. | |
default: 5 | |
selector: | |
number: | |
min: 1.0 | |
max: 100.0 | |
unit_of_measurement: W | |
mode: slider | |
step: 1.0 | |
starting_hysteresis: | |
name: Starting hysteresis | |
description: Time duration the power measurement has to stay above the starting | |
power threshold. | |
default: 5 | |
selector: | |
number: | |
min: 0.25 | |
max: 60.0 | |
unit_of_measurement: min | |
mode: slider | |
step: 0.25 | |
finishing_threshold: | |
name: Finishing power threshold | |
description: Power threshold below which we assume the appliance has finished. | |
default: 5 | |
selector: | |
number: | |
min: 1.0 | |
max: 100.0 | |
unit_of_measurement: W | |
mode: slider | |
step: 1.0 | |
finishing_hysteresis: | |
name: Finishing hysteresis | |
description: Time duration the power measurement has to stay below the finishing | |
power threshold. | |
default: 5 | |
selector: | |
number: | |
min: 0.25 | |
max: 60.0 | |
unit_of_measurement: min | |
mode: slider | |
step: 0.25 | |
actions: | |
name: Actions | |
description: Actions (e.g. pushing a notification, TTS announcement, ...) | |
selector: | |
action: {} | |
pre_actions: | |
name: Actions | |
description: Actions when starting threshhold is crossed | |
selector: | |
action: {} | |
source_url: https://gist.github.com/sbyx/6d8344d3575c9865657ac51915684696 | |
trigger: | |
- platform: numeric_state | |
entity_id: !input 'power_sensor' | |
for: | |
minutes: !input 'starting_hysteresis' | |
above: !input 'starting_threshold' | |
condition: [] | |
action: | |
- choose: [] | |
default: !input 'pre_actions' | |
- wait_for_trigger: | |
- platform: numeric_state | |
entity_id: !input 'power_sensor' | |
below: !input 'finishing_threshold' | |
for: | |
minutes: !input 'finishing_hysteresis' | |
- choose: [] | |
default: !input 'actions' | |
mode: single | |
max_exceeded: silent |
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: Z2M - Hue Tap Switch 4 buttons (v1.0) | |
description: Use the individual buttons of the Hue Tap switch to control an action | |
by a tap. | |
domain: automation | |
input: | |
dimmer: | |
name: Hue Tap switch | |
description: Hue Tap Switch to use (Zigbee2mqtt Action Sensor) | |
selector: | |
entity: | |
domain: sensor | |
multiple: false | |
button_1: | |
name: Button Single Dot | |
description: Action to run on click of single dot button | |
default: [] | |
selector: | |
action: {} | |
button_2: | |
name: Button Two Dots | |
description: Action to run on click of two dot button | |
default: [] | |
selector: | |
action: {} | |
button_3: | |
name: Button Three Dots | |
description: Action to run on click of three dot button | |
default: [] | |
selector: | |
action: {} | |
button_4: | |
name: Button Four Dots | |
description: Action to run on click of four dot button | |
default: [] | |
selector: | |
action: {} | |
source_url: https://community.home-assistant.io/t/z2m-philips-hue-tap-switch/329686 | |
mode: queued | |
max_exceeded: silent | |
trigger: | |
- platform: state | |
entity_id: !input dimmer | |
# attribute: action | |
action: | |
- variables: | |
command: '{{ trigger.to_state.state }}' | |
- choose: | |
- conditions: | |
- '{{ command == ''press_1'' }}' | |
sequence: !input button_1 | |
- conditions: | |
- '{{ command == ''press_2'' }}' | |
sequence: !input button_2 | |
- conditions: | |
- '{{ command == ''press_3'' }}' | |
sequence: !input button_3 | |
- conditions: | |
- '{{ command == ''press_4'' }}' | |
sequence: !input button_4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment