Skip to content

Instantly share code, notes, and snippets.

@madmuffin1
Created November 17, 2025 10:57
Show Gist options
  • Select an option

  • Save madmuffin1/8ac4ea3087cc1c2090870b050cc663ba to your computer and use it in GitHub Desktop.

Select an option

Save madmuffin1/8ac4ea3087cc1c2090870b050cc663ba to your computer and use it in GitHub Desktop.
# fork from https://community.home-assistant.io/t/daily-thermostat-schedule/395834,
# which did not work for some of my thermostats, as the switch heat/cool never matched any value
blueprint:
name: Heating Daily Schedule
description: Set the target TRV temperature based on its mode.
domain: automation
input:
climate_id:
name: Thermostat
description: The thermostat to control.
selector:
entity:
domain: climate
heating_temp:
name: Heat Set Point
description: The target temperature when heating.
selector:
number:
min: 0
max: 100
at_time:
name: Time
description: The time to update this device.
selector:
time:
retry_timeout:
name: Retry Timeout
description: Duration (in minutes) to retry if the device is offline.
default: 0
selector:
number:
min: 0
max: 240
on_monday:
name: Monday
default: true
selector:
boolean:
on_tuesday:
name: Tuesday
default: true
selector:
boolean:
on_wednesday:
name: Wednesday
default: true
selector:
boolean:
on_thursday:
name: Thursday
default: true
selector:
boolean:
on_friday:
name: Friday
default: true
selector:
boolean:
on_saturday:
name: Saturday
default: true
selector:
boolean:
on_sunday:
name: Sunday
default: true
selector:
boolean:
variables:
# re-declare input as a variable for scripting templates
retry_timeout: !input 'retry_timeout'
# array used in the condition for this automation
weekly_schedule:
- !input 'on_monday'
- !input 'on_tuesday'
- !input 'on_wednesday'
- !input 'on_thursday'
- !input 'on_friday'
- !input 'on_saturday'
- !input 'on_sunday'
trigger:
- platform: time
at: !input 'at_time'
# only run on days we have been requested (using schedule array)
condition: '{{ weekly_schedule[now().weekday()] }}'
action:
# thermostats require different inputs depending on the current mode
- sequence:
- repeat:
# set the target temperature to the heating_temp input
sequence:
- service: climate.set_temperature
entity_id: !input 'climate_id'
data:
temperature: !input 'heating_temp'
- delay: '00:01:00'
# verify that the temperature was set until the retry timeout expires
until:
- or:
- '{{ repeat.index > retry_timeout }}'
- condition: state
entity_id: !input 'climate_id'
attribute: temperature
state: !input 'heating_temp'
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment