I use local calendars for scheduling the temperature I want to set in each room using my blueprint Heating X.
For heating control automations, simply turning the heating on or off is not sufficient – I want to specify the target temperature as well. In my blueprint I deployed a ‘trick’ of writing the temperature in the description between two hashes, then writing a template to extract it. That works fine, but it would have been much easier if I could have defined my own calendar event field ‘temperature’ (with type numeric, floating point, 1 decimal place).
I would then like to read it with a statement like
Of course, temperature is not a special case. Such a feature could be used to set lighting to a specific colour (RGB), irrigate a specific zone in the garden, or set a camera to a specific angle.
My feature request therefore is to provide a facility to add custom fields to calendar events alongside the generic Summary (name), Event start, Event end, and Description, with types similar to those of ‘input_’ helpers (text, number, datetime, dropdown), for values corresponding to the states used by all platforms (light, climate, camera, media_player, etc.).
This would raise the game of scheduling stuff by calendar to a whole new level
That is a very interesting alternative that I did not know about. Can the same be done with the Description field?
My feature request still stands as a more user friendly and robust approach. The iCalendar standard apparently supports private software extensions, a.k.a. plug-ins, that might offer a technical solution to the request.
I confirm this is possible and is my current workaround. However, it does require some template programming skill. I have developed code that extracts a number from between two hashes in the description field, checks if there is a number at all and whether is it within bounds, and corrects the step size. See the Heating X2 blueprint
However, it would be a lot easier to specify a temperature (or any other attribute) with an event, and would be open to more HA users, if a calendar attribute could be created in a way analogous to HA helpers. No separation character would be needed (the hashes in my case), the type would be fixed (a number in my case), the upper and lower bounds and the step size could be set as usual, the description field would be free for its intended purpose.
JSON a mature, widely used standard and Home Assistant supports it. It’s easier to validate than custom data-seralization techniques because the tools are built-in.
Having said that, if all you need to do is pass one or two values then JSON may introduce more overhead than is necessary for the task.
Either way, the point was that what your FR requests is already possible using the Description field.
A calendar event conforms to a standard supported by several calendar integrations. Therefore unless that standard supports the addition of “freeform” fields, you can’t simply add them because it will break calendar integrations. In contrast, the Description field is part of the standard and so is supported by all calendar integrations.
Good arguments and I admit the feasibility because that is what I am doing – well, I use jinja inside templates, but that is much the same.
My case is that it could be simpler and more robust, but I leave it to others to comment whether there is a demand.
It is not uncommon for calendars to support the addition of custom fields, so there is no need to break any standard. E.g. Google does it with an add-on.
Would love that feature too. I can’t tell my wife to put JSON into the description field to schedule something.
Also it would help to use one calendar for multiple things without parsing description or summary.
I first thought about labels on events, which at least would work for using one calendar for multiple stuff (house calendar for all house related schedules, instead of sperate boiler, heating etc. calendar).
But this request is even better to define settings… if I could define multiple “helpers” on the calendar which are then available in the events would be even better “settings” of the event as described above.
A even more user friendly solution would be to define event tempaltes with different set’s of helpers defined. And allow to define which templates are allowed in which calendar. That way I would predefine a heating template with all settings and let my wife define the schedule for it in the calender without having to hack arround JSON.
Another usefull idea additional to helpers… selectors. This would also allow for selecting entities.
My use case would be to have a “Camera Blackout” calendar. In which I can insert “Privacy entries”. So if I want a camera or multiple cameras to “blackout” or not record during a time frame, I could create an entry and select which cameras.
I.e. only want the cameras in the backyard disabled, but keep front cameras on for the specific time frame.
This would allow for on demand entries and also planned recuring events like every day during daytime when someone is at home.