Created
January 26, 2025 22:59
-
-
Save Didgeridrew/25aa0e9a478e92d033de7b625e914a99 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: Testing Trigger-based Template Blueprint | |
domain: template | |
input: | |
input_var_1: | |
input_var_2: | |
variables: | |
var_1: !input input_var_1 | |
var_2: !input input_var_2 | |
trigger: | |
- triggers: | |
- platform: state | |
entity_id: input_boolean.ztest_new_bool | |
action: | |
- action: notify.persistent_notification | |
data: | |
message: |- | |
var_1: {{var_1}} | |
var_2: {{var_2}} | |
sensor: | |
- state: >- | |
{{ var_1|int(0) + var_2|int(0) }} | |
-------------------------------------------------------------------- | |
blueprint: | |
name: Save a time | |
description: Creates a sensor which holds the time of a trigger event | |
domain: template | |
input: | |
trigger: | |
name: Trigger | |
description: The trigger | |
exclude: | |
name: Exclude Mod | |
description: Any integer, the modulo of which will be excluded from minutes that update state | |
trigger: !input trigger | |
variables: | |
mod: !input exclude | |
condition: | |
- condition: template | |
value_template: "{{ now().minute % mod != 0 }}" | |
sensor: | |
state: "{{ now() }}" | |
availability: "{{true}}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment