Scheduler card/custom component

Schermata 2020-10-22 alle 08.52.35

With version 1.8.3 there is this error and I don’t see my schedule with custom HA group entity.
My Code:

type: 'custom:scheduler-card'
customize:
  group.clima_zona_giorno:
    name: Clima zona giorno
    actions:
      - service: climate.set_temperature
        name: Set temperature
        variable:
          field: temperature
          name: Temperature
          min: 10
          max: 30
  group.clima_bagni:
    name: Clima Bagni
    actions:
      - service: climate.set_temperature
        name: Set temperature
        variable:
          field: temperature
          name: Temperature
          min: 10
          max: 30
include:
......

Hi, need some help…
When working with a climate device, selecting the cool or heat actions, and clicking next, we get the following window:
image

A few questions:

  1. When clicking on the temperature selection slider dot to start moving it, the bubble (where the temperature is displayed) is colored in orange. When the dot moves to any other place on the scale, the bubble is colored white. Suggest to change all to be the same color

  2. When sliding the dot, the steps are done in 0.5 degree. I tried to change this using “customize” to be 1 degree steps with no success. The used code is:

      - service: set_temperature
        variable:
          field: temperature
          step: 1

Can you please tell me how to set this up?

  1. When scrolling the dot, the temperature value that is displayed inside the bubble is not centered (it is a little below the center). Suggest to center it.

Thanks a lot for the amazing card!

I am confused, because earlier you posted that the card was broken for you, now all seems fine except for this detail…
What is going on here?
Is the card broken for you, or is it working OK…?

Anyway, for workday_sensor I had a ‘TBD’ in my code (in other words: I left something unimplemented intentionally).
The scheduler-component has support for workday sensor, the scheduler-card does not.
In other words: the time displayed in the card could be mismatching with the actual scheduled time (the card calculates the time on its own, does not take into account the state of the workday_sensor).

I understand this is unpractical/confusing. So I took the effort to fill this gap.
You should see it matching now (in v1.8.4).

Colour of the ‘bubble’ is defined in HA + your theme. I cannot change this…
There are recent changes in the slider component in HA, so could be that it looks different than before…

Same for this. Suggest to create an issue for it in the HA github.

What do you mean by ‘with no success’?
How does the result look like, and what do you expect?
This looks fine to me, see here for complete set of options.
I recommend adding min+max values…

Hi, thanks for clarifying regarding the two UI questions. I learn every day :slight_smile:
Regarding the temperature steps, the code I sent does not affect the behavior of the steps (still jump in 0.5 degree). I wanted to change the default step from 0.5 degree to 1 degree. What am I doing wrong?

BTW, I also added min and max. But now I see that this added a new action to the action list, it did not change the slider behavior inside the cool/heat action…

How actions in customize are processed:

  • If the action (combination of service / optional service_data), matches with a previously defined action (so from standard configuration), your action will overwrite the old action.
    Overwrite is not merge, so your name+icon+min/max levels etc are used instead…
  • If the action does not match with an existing action, the card will create a new action (It cannot ‘guess’ which one you are trying to modify)

So if you want to make modifications to the built-in heat / cool actions, you will need to add hvac_mode: heat (or cool) in service_data as well (because this is what standard configuration does for you).

I have several HA installations and actually one of them, at my brother’s house to be precise, has the problem I mentioned.

For the other one here is a new one. So I’m going to wait for the next version, don’t worry for the moment it’s only tests, the real schedules are always managed with automatons or Goole Agenda.

Hi again, I have done as I believe you meant. I now get:
image

My code now is:

                        customize:
                          '[[my_climate_entity]]':
                            exclude_actions:
                              - SET PRESET
                              - SET MODE
                              - TURN OFF
                              - COOL
                              - HEAT
                            name: ''
                            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: Cool Mode
                                icon: snowflake
                                service_data:
                                  hvac_mode: cool
                                variable:
                                  field: temperature
                                  step: 1
                                  min: 16
                                  max: 30
                              - service: climate.set_hvac_mode
                                name: Heat Mode
                                icon: fire
                                service_data:
                                  hvac_mode: heat
                                variable:
                                  field: temperature
                                  step: 1
                                  min: 16
                                  max: 30

A few comments/questions:

  1. I had to give the new customized “cool” and “heat” modes a different name than the standard names as if I gave them the same name, the “exclude_actions” will also remove them (not only the standard actions). Suggest that the “exclude_actions” will only remove standard configurations and ignore configurations done via “customize”
  2. The “turn AC off” added operation (which is a preset operation) now behaves differently than before. It appears on the actions list but when I click next and get to the next window, it is not selected under the “preset” list (“none” is selected) and I need to specifically select it. Before, it was automatically selected as I set the service_data to timeroff. I tried to set it via adding “variable” settings but it did not work. Can you please tell me what to do so that it behaves as before? Thanks!

Looks like a lot of trouble just to change the timestep…
Out of interest: why is changing the timestep so important to you? I mean you can always choose not to stop the marker at decimal numbers?

I would expect that there is no need to use exclude_actions if you overwrite the old action. As i said before, as long as you keep the service + service_data identical, the card should replace it.
Why did you see the need to hide the old ones?

I don’t understand what is happening.
If i add this:

customize:
  climate.my_thermostat:
  actions:
    - name: set preset to auto
      service: set_preset_mode
      service_data:
        preset_mode: auto

It creates an extra action:
Thermostat_preset
And after clicking next, its just fixed:
Thermostat_preset2
Which is how i would expect it.
Are you sure you are clicking the correct action?

Hello, the reason that I need the scheduled off operation to be different than the standard off operation (in my case, to be a different off message over MQTT) is that I need a different behavior in my controller when I get the off command from the climate card and when I get it from the schedule card. When I get it from the schedule card, I have an additional operation to execute in which I check the status of another device seating on the network that can signal me to delay turning off the ac by a configurable amount of time. I agree that this became complicated… I have an idea: can you define a way to perform a different operation for a certain action than the standard operation? In my case, can I tell the card that when an “off” command should be executed, not to call the standard off operation but to call the preset “timeroff” operation? I believe that this will solve all troubles…

And regarding the added preset command, I changed the code a little as you did:

                              - service: climate.set_preset
                                name: Turn AC Off
                                icon: 'mdi:hvac-off'
                                service_data:
                                  preset_mode: timeroff

On “next”, I get:
image
But on “save”, I get this:
image
The displayed command to be executed is missing text “set preset” instead of “set preset to timeroff”

Yes i got that :slight_smile:
And for me its fine that you introduce a ‘timeroff’ preset to send the different command.
Presets are intended for adding custom commands to HA climate entities :+1:

OK :+1:

No. Scheduler card just executes service call in HA. I cannot beat the rules of HA…

I believe you should just add a custom action for your ‘timeroff’ preset.
For me its OK that you call the action ‘turn off’.

Well this is a completely other problem than what you mentioned before.
I though you couldn’t get it running at all…

I agree that it should display the name of the action, which would be ‘Turn AC Off’.
Apparently the scheduler card couldn’t find a unique match for this action (since it is also matched to the ‘set preset’ action which is in the standard configuration).
And although this action is marked ‘hidden’ by you, it is still existing in the list.

Seems to be an unfortunate combination of circumstances…
I don’t have an easy fix for this.

This previously showed “set preset to timeroff” as needed. Somehow in the latest updates it broke…

Any way to get the starting position of the climate slider to be pre-set to the climate device current setpoint? would make it easier to set in my opinion. Also not a fan of the slider to begin with, though it does fill the space nicely. I think just the temperature number with some ± or <> would work better. I think most people aren’t moving the setpoint too much.

More data… If I change the code to:

                              - service: climate.set_preset_mode
                                name: Turn AC Off
                                icon: 'mdi:hvac-off'
                                service_data:
                                  preset_mode: timeroff

…changed service name from “set_preset” to “set_preset_mode”, I get the following window:
image
Previously, at that point, the “timeroff” preset mode was selected and now “none” selected which probably means that the “service_data” definition of timeroff may be ignored and this is why I see the different behavior from before

Found a somewhat solution… If I change the code to:

                              - service: climate.set_preset_mode
                                name: Turn AC Off
                                icon: 'mdi:hvac-off'
                                service_data:
                                  preset: timeroff

… Under service_data change to “preset: timeroff” instead of the previous setting of “preset_mode: timeroff” it works and gives me:
image
Which is not perfect but a reasonable solution :slight_smile:

Please start reading on how to set things up properly…
Its not like you can just choose your own service / service_data and expect things to work still.

People have spent time writing down how to set up your service calls correctly.
I strongly advise you to check it out and stick to the same naming (and never consider to do otherwise…)

I beg to differ :confused:

@neliss I come with another idea for timeslots that have a too small interval and the start and end times are not visible: when hovering with the mouse on the timeslot, display a bottom tooltip with the interval and action.
This will keep the interface clean, but still the user can see what’s going on there.
What do you say?