Setting different target temperatures for different events

In a calendar how do you set different target temperatures for different events? For instance in my village hall application an aerobics class doesn’t want the room as hot as say an old peoples’ lunch club.

One option is to write into the event title on the calendar the temperature, so the events become say “10am Aerobics 18C” and 12am Lunch 20C”. Or the temperature could go into the Description box of the event. Then with some code I extract the 18 or 20 numbers and use that as the target temperature. Is this easy to do?
If using the Description box it would be useful to have a figure like 18 always pop up there so it’s the default unless overridden when setting up an event

Any other ideas please?

I could have sworn that there was a post that showed exactly what you are asking for, but I can’t find it… the following covers the gist:

If the temperature is the only data you need to pass, you can simply use it on its own in the description/summary but using json formatting will allow you to pass multiple pieces of information if necessary.

You can set a default in the automation in case no value is supplied or someone adds something to the summary that doesn’t resolve to a number:

alias: Village Hall Temperature
description: ""
triggers:
  - trigger: calendar
    event: start
    offset: "-0:10:0"
    entity_id: calendar.village_hall
condition: []
action:
    - action: climate.set_temperature
      target:
        entity_id: climate.kitchen
      data:
        temperature: "{{ trigger.calendar_event.summary | float(18) }}"
mode: single

Thanks. That should help.

And thanks for clarifiing the compatibility with ical. That might help us import the organisation’s general calendar and then tweak it to add the temperture settings.