Scheduler card/custom component

I will take it into account. It will stay like this for a while longer though. Not to tease you, but due to other priorities.
I am planning to add dawn and dusk to the options. More people have asked for it. I don’t think I can make these clear with just icons, you will get it your way. :slightly_smiling_face:

And, when having options sunrise, sunset, dawn and dusk to choose from, I think the switching between fixed time and one of those will become even more confusing as well. Too much.

I think I will make something with tabs. Fixed time or relative time + offset or something. Offset should be an optional choice, I don’t think it should get the emphasis that it has now.
The development of this card is a learning experience. Cannot get it all right the first time. I Hope everyone can tolerate the changes. :smile:

1 Like

Bonsoir, some questions…

  • In the integration it is possible to add several schedulers, it is voluntary (1 scheduler per thermostat for example…) or just something to correct ?

  • I saw above a working screen shoot for the thermostats programming, I think it would be good to foresee that if a start is at 20:00 for example it can end the next day at 01:00 after midnight…

  • The conditions seem important to me (even if we can get around it with a script for the moment). The same goes for the possibility to directly enter a friendly_name

  • One last thing. If in the state of a schedule I can easily retrieve an attribute to display it with Multiple Entity Row in Lovelace, it’s impossible for the set temperature which is a kind of sub attribute… Could it be possible that it’s just an attribute ?

entries:
  - D0T1200A0
actions:
  - service: climate.set_temperature
    entity: thermostat_cuisine
    temperature: 16
next_trigger: '2020-09-26T12:00:00+02:00'
friendly_name: 'Schedule #d67696'
icon: 'mdi:calendar-clock'

And thank you again for working on this difficult subject and great absentee of Home Assistant !

I wanted to write an article, in French, but I’m going to wait for the project to evolve a bit because it seems very promising.

Lionel

You’re doing great work. Keep it up!

1 Like

Hi @Canaletto, hi Lionel,

I am not sure what you mean here. You mean separate cards in Lovelace?
This is possible, a few users already use it like this. I recommend you to read this section (and apply the tip mentioned after the table). And then define which entities + actions you want to show up per card.

  • I saw above a working screen shoot for the thermostats programming, I think it would be good to foresee that if a start is at 20:00 for example it can end the next day at 01:00 after midnight…

Currently the view is fixed to 24 hours view from 00:00-23:59. It means you cannot plan an action to end on the next day. But you can include an extra block for the beginning of the next day.

I like your idea though. Maybe I will make an option for choosing which timespan you want to choose.
If you really want to make a case for it, please add a feature request. I prefer it because other users can share their view on this. And it helps me memorize :slightly_smiling_face:

  • The conditions seem important to me (even if we can get around it with a script for the moment). The same goes for the possibility to directly enter a friendly_name

There are open feature requests for both. They are not too easy though, so it will take some time before it becomes available. I understand the need for it.

One last thing. If in the state of a schedule I can easily retrieve an attribute to display it with Multiple Entity Row in Lovelace, it’s impossible for the set temperature which is a kind of sub attribute… Could it be possible that it’s just an attribute ?

This is very tricky. I don’t think I can make this.
In future releases it will be possible to assign multiple actions in a schedule entity (for example with the timeslot planner). So multiple temperatures may exist as well. The actions will have to be a list of actions.

I wanted to write an article, in French, but I’m going to wait for the project to evolve a bit because it seems very promising.

Many users mentioned that they were missing a scheduler in HA. That is also why I dediced to start this project. It is now ~6 weeks since the first publication. It is still very basic, but a lot of ideas are proposed. I plan on improving it every week (if I have the time). I think it will evolve quickly.

1 Like

image

I have an integration of the scheduler, but it is possible to add more…

Most people just use the same one, and instead just use filters on each card.

@Canaletto The integration is just there for storage and timekeeping. The ‘1 device’ is also a fictive device, simply because in HA it is required to have one. There is not really an added value to splitting it up. I would like to keep it centralized.

First of all, a big THANK YOU for this component, I still cannot believe HA does not have a standard component/widget for this!

I have a rather weird problem: I can install/add the custom component/make the UI work but on every HA restart, the scheduler component just disappears from the list of Components in HA, along with all the current schedules. I have to re-add it via the Configuration/Integrations screen. No relevant logs that I can see. Using HA 0.115.2. Any ideas?

Thank you, keep up the good work!

@virgilm Never heard that one before :slightly_smiling_face:
What I would try (only if you are good with computers! If you fail, your HA database may be corrupted! Don’t blame me later please).

  1. Remove all schedule entities.
  2. Shutdown HA
  3. go to .storage folder in your HA folder
  4. open the core.config_entries file and look for scheduler integration. Remove the whole section between curly brackets { } (section starts with entry_id and ends with unique_id). Make sure to leave a comma.
  5. repeat the same in core.device_registry. find an entry with name: scheduler, remove the block from config_entries to name_by_user.
  6. Restart HA

Now your HA config is free of any traces of this integration. Add it again in the ‘integrations’ page.
If the problem persists, it is probably due to caching issues. Somehow HA uses caching of integrations. You could try to install with a private browser or something.

Good luck!

Is this just with this component? Try installing a different component and see if that one stays after a HA restart. Trying to make sure your SD card is not getting corrupted, before you drive yourself crazy and try everything else :wink:

Not fun troubleshooting for a week straight going crazy, to find out the sd card is corrupted to the max (happened to me).

Thanks for the prompt reply.

I wiped the whole DB and the .storage directory, same result. Yes, only this component. I might have installed it wrong, but it does show up in the list and I can see services and switches that belong to the scheduler, so everything at least seems ok.

Never mind, it’s part of the “fun” upgrade to 0.155.2. Old components (installed before the upgrade) show up, but new ones don’t install properly. So, nothing to do with this component. I’ll keep digging.

Do yourself a favor and DONT run HA from an SD card. You will be really sitting on a timebomb.
After a year or so the SD card will start to have damaged files because of too many RW cycles. It really gives you headaches.

If you have a raspberry pi, its super easy to solve by storing your data on a connected usb stick or SSD. Filesystem can stay on the SD card if preferred.
I will never go back :blush:

Oh yes I know. But I’m running on RPI4. USB boot is just recently available and is still in beta on HA. It only works with the 64-bit HA image. It’s still hit or miss (I follow the thread) with 64 bit. So I’m waiting for it to go out of beta to use an SSD.

I know there are other ways as well since a longer time, like booting from sd and running HA on ssd after initial boot. But I don’t want to go to all the trouble going that way and when official ssd support comes, reverting stuff and doing more work.

Hello, i have a climate for each room in my house.
I would like to schedule every bed room with 1 schedule.
If i create a custom switch that can turn on and off my different climate, will it work ?
and how integrate that custom switch in the schedule-card ?

Create input_booleans and set automations that turns on your climate with it’s set on and turn off climate when the input_boolean is set to off. Then just add input_boolean to domains in this card, for example:

  type: 'custom:scheduler-card'      
  domains:
    input_boolean:
      actions:
        - service: turn_on
        - service: turn_off
      include:
        - input_boolean.climate_livingroom
        - input_boolean.climate_kitchen
        - input_boolean.climate_bedroom
        - input_boolean.climate_office
        - input_boolean.climate_bathroom
        - input_boolean.climate_hallway

Thank you.
I’ll try.

1 Like

This code is ok for me

type: 'custom:scheduler-card'
discover_existing: false
standard_configuration: false
title: Cuisine
time_step: 1
domains:
  climate:
    icon: thermometer
    actions:
      - service: set_temperature
        variable:
          field: temperature
          min: 14
          max: 24
          step: 0.5
      - service: set_hvac_mode
        service_data:
          hvac_mode: 'off'
        name: HVAC to Off
      - service: set_hvac_mode
        service_data:
          hvac_mode: heat
        name: HVAC to Heat
      - service: set_preset_mode
        service_data:
          preset_mode: none
        name: Preset to None
      - service: set_preset_mode
        service_data:
          preset_mode: away
        name: Preset to Away
      - service: turn_on
      - service: turn_off
    include:
      - climate.thermostat_cuisine

So if i well understand, i can use this code and add as many as climate i want to control under the “include"section”.

@guims78 I’m working on a new feature that will help you.
You will only have to tell the card which types of entities you want to see.
The card will calculate the actions.
I think i can release it tomorrow.

1 Like