Hello,
I’m just getting started with the local calendar add in and automation. I recently installed a number of smart TRVs and want to create a schedule to heat rooms in a predictable manner.
For example the bedroom should heat from 05:30 to 06:00
The office from 09:30 to 17:00
The kitchen a couple of different times and so on.
I installed the local calendar and tried to set up automations, but hit a couple of snags.
Also, some of my rooms have apostrophes in their names - Steve’s Office and Jacquie‘s Office are problematic.
I’ll start with a head’s up. The apostrophe / single quote above are different characters - I have a mixture of UK and Swiss keyboards and typing is not consistent between them. I am correcting the ‘ to ’ when I come across it. The associated entity names are also created differently steve_s_office or steves_office will be generated depending on the keyboard used - I’m adjusting these too.
Local calendar has a heating calendar and each event has the subject of the room name. I want to turn up and turn down the heating according to the schedule start and end and to use a numeric helper to set the temperatures.
alias: Steve’s Office Heating
description: ""
trigger:
- platform: calendar
event: start
entity_id: calendar.heating
- platform: calendar
event: end
entity_id: calendar.heating
condition:
- condition: template
value_template: "{{ trigger.calendar_event.summary == 'Steve\\'s Office' }}"
action:
- if:
- "{{ trigger.event == 'start' }}"
then:
- service: climate.set_temperature
target:
entity_id: climate.steves_office_heating_thermostat
data:
temperature: input_number.steves_office_heating_comfort
else:
- service: climate.set_temperature
target:
entity_id: climate.steves_office_heating_thermostat
data:
temperature: input_number.steves_office_heating_cool
mode: queued
In this case, the trigger condition is never matched - I can’t figure out the escape characters needed for the {{ mustache template string.
In this second config, for the kitchen this time, the YAML is corrupted on save:
alias: Kitchen Heating
description: ""
trigger:
- platform: calendar
event: start
entity_id: calendar.heating
- platform: calendar
event: end
entity_id: calendar.heating
condition:
- condition: template
value_template: "{{ trigger.calendar_event.summary == 'Kitchen' }}"
action:
- if:
- "{{ trigger.event == 'start' }}"
then:
- service: climate.set_temperature
target:
entity_id: climate.kitchen_heating_thermostat
data:
temperature:
"[object Object]": null
else:
- service: climate.set_temperature
target:
entity_id: climate.kitchen_heating_thermostat
data:
temperature:
"[object Object]": null
mode: queued
I tried to code {{ input_number.kitchen_heating_comfort }} but that does not work and temperature value is rendered as [object Object].
How to code the moustache template to read the float value from the number helper?
Steve