Skip to content

Instantly share code, notes, and snippets.

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:
@Didgeridrew
Didgeridrew / bp_relative_temp_climate.yaml
Created December 13, 2024 16:32
HA - Blueprint - Increase or Decrease Target Temperature (Relative)
blueprint:
name: Increase or Decrease Target Temperature (Relative)
description: Increase or decrease the temperature a given number of degrees relative to the current setting
domain: script
input:
climate_ent:
selector:
entity:
filter:
domain: climate
@Didgeridrew
Didgeridrew / shade_predictor.yaml
Created July 5, 2024 20:13
HA - LUT w/ MAcro for alexamend shade predictor
{% set y_day_azi = {
1:
{"north": none,
"east": none,
"south": [126,207],
"west": [202,232]},
13:
{"north": none,
"east": none,
"south": [123,207],
alias: Office Wall Switch
description: ""
trigger:
- platform: state
entity_id:
- switch.office_wall_switch_1
- light.office_ceiling_light
- switch.office_wall_switch_2
- climate.office_ac
- switch.office_wall_switch_3
@Didgeridrew
Didgeridrew / wk_min_temp.yaml
Last active March 30, 2024 15:28
HA - Weekly Minimum Temp
template:
- trigger:
- platform: state
not_to:
- unknown
- unavailable
entity_id: sensor.temp
- platform: template
value_template: "{{ now().weekday() == 0 }}"
action:
@Didgeridrew
Didgeridrew / times_opened.yaml
Created February 6, 2024 16:43
HA - Times opened, like History stats but without time
template:
- trigger:
- platform: state
entity_id: input_boolean.test_bool_1
to: "on"
- platform: event
event_type: custom_reset_times_opened
- platform: event
event_type: event_template_reloaded
sensor:
@Didgeridrew
Didgeridrew / event_x_dates.yaml
Created February 1, 2024 05:11
HA - Create cloned events over multiple dates
alias: Repeat for Each date create Cal event
description: ""
fields:
summary:
required: true
name: Event Summary
description: The title/summary for the calendar events
selector:
text:
work_date_1:
@Didgeridrew
Didgeridrew / light_color_loop.yaml
Last active February 1, 2024 04:55
HA - Script Loop Light Colors
script:
color_loop_light:
alias: Color loop light
description: ""
fields:
colors:
name: Colors
description: A list of color names to set the lights to or loop through
required: true
sequence:
@Didgeridrew
Didgeridrew / random_options.yaml
Created February 1, 2024 04:39
HA - Randomize Options from a Select
# This was just a weird idea to randomize a list of values.
# Maybe it could be used for chores or activity planning?
alias: Random Option to calendar
sequence:
- variables:
option: |-
{% set options = state_attr('input_select.colors_warm', 'options')%}
{% set ns = namespace(x = options) %}
{% for i in range(ns.x|length- 1, 0, -1) %}
@Didgeridrew
Didgeridrew / nested_logical_con.yaml
Created February 1, 2024 04:29
HA - Demostrating Nested Logical Conditions
alias: Nested logical conditions
sequence:
- choose:
- alias: This works
conditions:
- condition: not
conditions:
- condition: template
value_template: false
sequence: