I was used to control my heating via “scheduler” in Nest app. HA has no such interface, but it integrates smoothly with Google Calendar, which is far more better. Now I can have daily tasks and home automation triggers in one app.
1.) You will need Google Calendar Event configured. I recommend to create new calendar just for home assistant.
# Used for Google Calendar
google:
client_id: !secret google_id
client_secret: !secret google_secret
2.) Then in google_calendars.yaml select some keyword which will trigger automation. You will use this keyword (#heat) in title of events.
- cal_id: <your_calendar_id>@group.calendar.google.com
entities:
- device_id: thermostat
name: Thermostat
track: true
search: "#heat"
3.) Create automation (automation.yaml) and events in calendar. Event title starts with desired temperature (e.g. 21.5) followed by space and trigger word. Keep in mind that new events will be propagated to HA after about 15min.
- action:
- data_template:
temperature: '{{ states.calendar.thermostat.attributes.message | replace(" #heat","") | float}}'
entity_id: climate.living_room
service: climate.set_temperature
alias: Temperature by calendar
condition: []
id: temperature_by_calendar
trigger:
- entity_id: calendar.thermostat
from: 'off'
platform: state
to: 'on'