Scheduler card/custom component

@LeadUr Yes, I don’t see any reason why it would be incompatible. But I didn’t try it myself.

1 Like

Ho my… @neliss you are a beast! I just came back around, read all the new messages, new nice features, and by that time you even do a new release!

That’s terrific! I which I could help you in some way because you really deserve it!

PS : @Canaletto funny to find you around, I discovered a few things thanks to your blog when I started with HA. Keep up the writing, it will help a lot of people not fluent in English I think :wink:

1 Like

@Gromy Thanks for your positive comment!
But first try it out yourself, before getting too enthousiastic :wink:
The new introduced features (such as time slots) are far from finished if you ask me.
Still looking for a more user friendly UI.
All I’m asking from users is to share their likes and dislikes (and it is important not to only share the dislikes :slight_smile:) and come up with new ideas*.
This helps me a lot!

*With ideas I don’t necessarily mean additional features, as the card should remain simple. Ideas for improving the user experience.

I wonder how the time slots section can be improved so that small time sections are also visible.
image
If you select periods smaller than 1h, the time interval, and set value, become hidden.

I wonder too :slight_smile:
One option is to turn it vertical.
Another option is to add some zoom function.
I would really like to find a good solution such that it could become the default editor.
It remains a beta feature for now, because I’m well aware of the limitations.

I already wrote a post with lots of bugs:

Just a wild guess :slight_smile:
Translations via lokalise app- avoids several issues I guess IMO…
Thanks for a great add-on BTW :slight_smile:

@Gromy, Merci !
As I’ve already explained, if I take notes on what I’m doing, I often can’t manage to read it, so when I write to share I have to write a little more clearly. In everything I’ve written about HA there are some obsolete things, and I’m happy because this Scheduler will make some of my articles totally obsolete.

Of course, I’ve planned an article about Niels’ scheduler, but I’m waiting a little bit to do something complete, in particular to see what it will do for the conditions and also to see how to activate/deactivate them (it will take the FriendlyNames) according to the lifestyles…

Not sure if I’m missing anything here, but more user friendly names for input numbers would be good.

Also, template support.

My config:

    cards:
      - type: custom:scheduler-card
        standard_configuration: False
        am_pm: True
        include:
              - input_number.tariff
        groups:
          - name: "Utility Tariff"
            icon: power-plug
            include:
              - input_number.tariff
        customize:
          input_number.tariff:
            actions:
              - service: input_number.set_value
                service_data:
                  value: 0.13
# state: {{input_number.peak_tariff_utility}}
                name: "Peak"
                icon: mdi:cash-100
              - service: input_number.set_value
                service_data:
                  value: 0.04
# state: {{input_number.partial_peak_tariff_utility}}
                name: "Partial Peak"
                icon: mdi:cash-multiple
              - service: input_number.set_value
                service_data:
                  value: 0.01
# state: {{input_number.off_peak_tariff_utility}}
                name: "Off Peak"
                icon: mdi:cash

Also, I really need to know the time periods configured, I started something very crude here:

Please let me know if I’m on the right track or there is a better place to do this.

Great work overall!

What happens when a time scheme enters an “undefined” slot? does the entity return to the previous state? or do i have to explicitly define that for the slot following the activation slot? So I have a slot to turn on the light from 6am to 8am then an “undefined” slot" then a slot to turn on the light from 6pm to 8pm, then an undefined slot. Is the light shutoff at the end of it’s designated slot? or do I need to define “turn off” in the in between slots?

It just doesn’t do any actions, if it has a state set already from a previous schedule and it wasn’t changed since it’ll keep that state.

Great, thanks, I will add the “off” action to the in between slots. As an aside, it seems the slot ending at midnight and the slot starting at midnight are different slots? it seems these should be the same slot?

I thought a bit about how it could be improved by keeping the current layout. I’m no way a UI designer unfortunatelly.
But a solution that could solve some of the issue would be to change a bit the alignment of the time slot start/end boxes, something like this:

I know, this does not solve making visible the set state for the small timeslot, nor the case where small timeslots are one after another.

3 Likes

Hello,

I am new to HA. I am very happy to find after two weeks of research scheduler card which for me will solve a lot of problem. I have a problem with the schedules: in my schedules I have a delay of 2 hours. I am in France. Is it possible to change UTC? If so where?
Thank you for your work !

Go to ‘configuration’ and then choose ‘general’.
Here you can point your location on the map and click save.
After restarting HA, you should see that the timezone on this page has changed.
Its very important to configure your location. It is also used for detecting sunrise/sunset times.

Yes ! It’s ok for me. Thanks you very much for your Amazing work

@neliss I have a timeslot configured (the one I posted above) for a climate entity and one slot should set the target temperature to 22degrees from 6:00 to 6:30. That did not happen however, the climate history graph shows the target temperature flatline since midnight.
I created another timeslot that would trigger in 10 minutes. That one triggered and set the target correctly.
How do we troubleshoot problems like this?

@clau-bucur If i understand your time scheme correctly:

  1. from 00:00 to 06:00 heater at 20.5C
  2. from 06:00 to 06:30 heater at 22C
  3. from 06:30 to 15:00 heater at 20.5C

And time slot 2 is missed you say.
To troubleshoot this, please share:

  • The attributes of this schedule entity
  • History graph of the schedule entity (should show the ‘triggered’ minutes)
  • History graph of the climate entity

Another good clue would be to create a template sensor that stores the next_trigger property of the schedule. Same for the climate setpoint (theoretically it could be a problem of this entity as well)
But then we would have to wait for the next night where the problem occurs.

Ofcourse the behaviour of the scheduler-component should be the same for each timeslot (no matter how short). So I don’t see a straight-forward cause for this.

Hello, moved my support request here :slight_smile:
I have implemented my own “turn off” function and for that, I need to define the list of actions on my own. My code is below and issue is explained below the code:

                        type: 'custom:scheduler-card'
                        title: false
                        discover_existing: false
                        standard_configuration: false
                        include:
                          - '[[my_climate_entity]]'
                        customize:
                          '[[my_climate_entity]]':
                            actions:
                              - service: climate.set_preset_mode
                                name: Turn AC Off
                                icon: 'mdi:hvac-off'
                                service_data:
                                  preset_mode: timeroff
                              - service: climate.set_hvac_mode
                                name: Set mode
                                icon: 'mdi:cog-outline'
                                variable:
                                  field: hvac_mode
                                  name: Operation mode
                                  options:
                                    - value: heat
                                      icon: fire
                                    - value: cool
                                      icon: snowflake
                              - service: climate.set_temperature
                                name: Set Temperature
                                icon: 'mdi:coolant-temperature'
                                variable:
                                  field: temperature
                                  name: Temperature
                                  min: 16
                                  max: 30

My questions:

  1. Is that the correct way (and actions definitions) to define this?
  2. I set some timers using that setup and the list of times is displayed not formatted correctly:
    image
    See how the mode/temp settings are displayed (not in separate lines as they should)
    Thanks for your help!

This is how it should look. I decided to combine entity + action in one line, because I received a lot of requests to make the overview page more compact.

Your code looks fine, but I don’t recommend disabling the standard_configuration.
The actions that you use should be available for selecting when using the standard configuration (so only including your climate entity should be sufficient!).

If you have a problem with additional actions/options showing up in the card, perhaps I could add a feature to hide unwanted stuff.
Personally it doesn’t bother me, but if you have reasons for it, there is always a way.
I think the code should become more easy this way.