Skip to content

Instantly share code, notes, and snippets.

@psyciknz
Last active March 15, 2022 19:58
Show Gist options
  • Save psyciknz/8019e920ea716baf72b76b15b4f8b2a4 to your computer and use it in GitHub Desktop.
Save psyciknz/8019e920ea716baf72b76b15b4f8b2a4 to your computer and use it in GitHub Desktop.
Heating blueprint for time of day
blueprint:
name: Heating Control Time Period
description: Control your heating with for a particular time period
domain: automation
input:
heating:
name: Climate Device
description: The climate device to use.
selector:
entity:
domain: input_boolean
temp_sensor:
name: Temperature Sensor
description: Temperature Sensor to check.
selector:
entity:
domain: sensor
device_class: temperature
min_temp:
name: Minimum Temp
description: If temperature is below this value and morning/evening turns heating on.
default: 15
selector:
number:
min: 11.0
max: 25.0
step: 0.1
mode: slider
set_temp:
name: Temperature Target
description: If the heating turns on, It heats to this target temperature.
default: 20
selector:
number:
min: 14.0
max: 25.0
step: 0.1
mode: slider
time_period:
name: Time Period
description: For this time period use the following thresholds
default: DAY
selector:
select:
options:
- MORNING
- DAY
- EVENING
- LATEEVENING
- NIGHT
variables:
set_temp: !input 'set_temp'
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- platform: time_pattern
minutes: /1
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: !input 'temp_sensor'
below: !input 'min_temp'
- condition: state
entity_id: sensor.time_of_day
state: !input 'time_period'
sequence:
- service: input_boolean.turn_on
target:
entity_id: !input 'heating'
- choose:
- conditions:
- condition: numeric_state
entity_id: !input 'temp_sensor'
above: !input 'set_temp'
- condition: state
entity_id: sensor.time_of_day
state: !input 'time_period'
sequence:
- service: input_boolean.turn_off
target:
entity_id: !input 'heating'
mode: single
@psyciknz
Copy link
Author

Added choosing the time period from a list....ideally I'll like this populated from a group. But this seems to work
Also added a turn off action if > temp_set and for current time period.

Need to add a check for the "powermode" of the heating. SCHEDULE then follow these rules. Else leave as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment