WTH can't I set a value for a period in a schedule

I would like to set an associated value for each period I set.

My use case is to replace my central heating schedule and in order to do so, I want the schedule entity to have on and off state like it currently does, but also associate a value to the period as well. E.g.

Ideas for presenting the values could be different colours or patterns for different values.

The weekly schedule was designed to be as simple as possible to provide for the widest possible application. It does this by only providing an ā€œon or offā€ state based on time of day.

If you want more complex scenarios you can automate it, or use multiple schedules. In your case a schedule for each temperature setting.

Though I do not think your idea is without merit. +1.

This would be a game changer! You could also use for lighting scenes

2 Likes

That absolutely makes sense!! I had the same thought after reading about the schedule helper. The demand for such feature could be really high I think since HA is still missing an easy way to define periodic schedules connected to additional conditions.
To make the current schedule really powerful it must allow defining custom attributes, that could be used in automatons to define conditions.
Sample use case:

  • themperature control: attribute: temperature - Iā€™d define a condition that if temperature is above or below this defined temperature then the automation does nothing, otherwise e.g. turn on the heater. This would prevent heating is summertime for example :slight_smile: In this particular case Iā€™d define two attributes - daytime temperature, nighttime temperature with different time periods to support day and night thermo comfort and spare energy
  • brightness attribute - for defining automatons that should turn on/off some lights based on brightness as an additional condition

In general defining custom attribute values per each day& time interval should be possible to make this helper really powerful and easy to use in defining powerful & useful automatons.

And one more tip - some button for copying time periods across days would also be very nice feature.

1 Like

Try Schedy, it does exactly that and much more (see WTH - scheduling - why start from scratch?)

And that isnā€™t a bad thing, but letā€™s not make everything simple; letā€™s keep (and support) the ability to do complex things for those than can, and want to. There is a risk the project is going for the lowest denominator.

Schedy is a good example - it is quite complex, but it is hugely powerful as a result. Have both schedulers available side-by-side (itā€™s what I have currently - Schedy and the Custom Scheduler).

1 Like

I would like to try to add this functionality to homeassistant core but I do not know how to update it in Frontend. Could someone from the Frontend team work on it with me?

2 Likes

Mate, you should definitely go to HA Discord and ask in there. A lot of devs are in the UI channel. Perhaps someone will respond. To me the backend code is also something I can cope with, but the front end - no idea.

1 Like

Itā€™s an old tread but maybe it helps someone. I had and still have the same need for values in schedules so I created this:

Scheduler Template Macro - Share your Projects! / Scripts - Home Assistant Community (home-assistant.io)

Itā€™s not in the UI but I think itā€™s pretty easy to set the times and values.

Still hoping for values in the official schedule helper! +1

2 Likes

A significant amount of time has passed. And I donā€™t see any answer about, yes this is going to be implemented, or if it will never see the daylight.

Anyway, providing a more easier way to come up custom metadata would great. Not only for schedules, but pretty much any custom entity.

Have you considered using a local calendar?

Calendar

You can have events such as

Heating:20
Heating:off

Install the Appdaemon add-on, and then use Schedy
Itā€™s a little bit of a learning curve but does what you want and so powerful

There is an open PR draft for adding values to schedule helpers. Hasnā€™t moved much since May though.

1 Like

The documentation says you can have data if the schedule is added in the Configuration file, but I canā€™t get it to work, even with the provided sample YAML.

Good news! :partying_face:
As of 2024.10 this is now a thing, thanks to @Klikiniā€™s work for this WTH item.
You can use the following shedule instead:

schedule:
  central_heating_schedule:
    name: "Central heating schedule"
    monday:
      - from: "06:30:00"
        to: "08:30:00"
        data: 
          temperature: 21
      - from: "09:00:00"
        to: "12:30:00"
        data: 
          temperature: 19
      - from: "14:00:00"
        to: "15:30:00"
        data: 
          temperature: 25

CC @DrewP

1 Like