- alias: Set temp based on calendar
trigger:
platform: state
entity_id: calendar.home_assistant_heating
to: "on"
action:
- service: xiaomi_aqara.play_ringtone
data:
gw_mac: 7811dcb38199
ringtone_id: 0
ringtone_vol: 100
I couldn’t get the heating part working so I started with something simpeler and it turns out it’s just not activating at all. It sees the calendar, gets the data, but the automation is never triggered:
Okay, after hours of trying…turns out an event must have a duration. I put in start time 2150 endtime 2150, didn’t work. 2150-2151 does work. Next problem, I’m trying to use the data from the event to set an temperature:
I don’t know what the rest of your code is like but this is how I did it.
I had an automation trigger an input_boolean when a calendar event happens, then other automation’s can use the status of the input_boolean as a condition of whether to run or not. At a set point each day the input_boolean gets reset back to off.
Like you mention you need a calendar event of at least 1 min.
- alias: Set temp based on calendar
trigger:
platform: state
entity_id: calendar.home_assistant_heating
to: "on"
action:
- service: climate.set_temperature
data_template:
entity_id: climate.living_room
temperature: "{{states.calendar.home_assistant_heating.attributes.message | float}}"