Scheduler card/custom component

if you acitvate weekday and workdays its creates two separate schedules

@Ih8rain2 Sorry for my late response.
I think your schedule strategy is quite OK.

You could maybe reduce the amount by using the time-schemes (so define timeslots for on/off actions).

I am receiving a lot of feedback (complaints) about the naming of schedules, and youā€™re not the first one who cannot find display_options.
Maybe I should make a schedule show up by its name by default (if name is entered).
Display_options should become added to the UI editor of the card as well.

Lot of improvement points always :wink:

1 Like

What is currently not possible is to create one card for all schedules for workdays, and another for the weekend (and holidays).
You can only divide different entities (or entity types) over cards.

There is a plan to assign a ā€œtagā€ to a schedule (e.g. ā€œweekendā€, ā€œholidayā€ etc) and allow the user to choose which tags belongs to which card, which should give more freedom.
Unfortunately this is not in place yet.

Great idea. Now the naming seems hidden in the options. Naming it directly in the card would be an excellent solution. I have tried it by editing the card yaml directly but that doesnā€™t work. There is nothing there ā€¦:grinning:

Hello. Thanks for your work. Can you add Number integration support?

@fardem how did you manage to define two different names for the two separate schedules of the weekday and the weekend (ā€œAn Werktagen Voreinstellung setzen auf sparmodusā€ and ā€œAm Wochenende Voreinstellung setzen auf Sparmodusā€)? I have tried to duplicate the ā€œnameā€ property within the ā€œcustomizeā€ section of the schedular-card in the ui-lovelave.yaml, but without success. Could you share your YAML code?

1 Like

@num Thats the Display option

type: custom:scheduler-card
include:
  - climate.wohnzimmer
  - input_boolean.wz_heizung
title: Wohnzimmer
time_step: 5
discover_existing: false
display_options:
  primary_info:
    - days
    - action
  secondary_info:
    - relative-time
    - time
  icon: hass:action

Hello!

I have an issue assigning a numeric value to costom object attribute.

I use a custom component hass-variables to store my data for my custom objects. Basically, it stores in itā€™s attributes the values of my classesā€™s fields which I want to change on schedule. Hass-variables has a very simple API to set a value of itā€™s fields - single service variable.set_variable. In my code (templates) I use this to set a value of any attribute and it works fine. But how do I tell a sheduler component to use it for setting a numeric value to an attribute needed? At the moment my test set-up is as follows:

type: custom:scheduler-card
title: Pool controller
display_options:
  primary_info:
    - '{name}'
  icon: entity
standard_configuration: true
include: 
  - variable.engineering_swimming_pool_controller
customize:
  variable.engineering_swimming_pool_controller:
    name: Ionizer alternation period
    actions:
      - service: variable.set_variable
        variable: engineering_swimming_pool_controller
        attributes:
          ionizer_alternation_period: object
discover_existing: false
time_step: 1

At the moment I am stuck when trying to make ā€˜objectā€™ a numeric value in sheduler card. In a shedule card I can pic ā€˜set_variableā€™ action for some time interval, but how do I pick a numeric value to assign for this time period ā€¦?

Is there any way to tell that a certain input should be a numeric_value/boolean/stringā€¦?

Basically, what I need is formulated in the criteria below:

  1. Set a numeric value on shedule.
  2. Write this numeric value into my objects attribute using variable.set_variable
  3. Not use any excessive external objects like input_number since I have houndreds of attributes to ammendā€¦

Hello @neliss ,

I had already written above. So that I can do my thermostat automation in ā€œnode redā€ I would need 2 additional attributes that I cannot find in the Scheduler so far. It would be perfect if I had the current mode (Eco / Comfort / Off) or temperature activated in the Scheduler. So ā€œLast Triggered Mode / Tempā€ and second one matching then ā€œNext Mode / Tempā€.

Is that somewhere in there? And if not, it would be great that it would come in as an attribute.

many thanks
fardem

Loving this extension. Was able to automate my TRVs (with some custom actions) to create a working schedule this winter and it was great!

I have a question though. Is it possible to create a schedule that is period based rather than time based? What I mean by that is that sometimes (a lot of times) I want to turn on my AC unit just for letā€™s say an hour starting now. With my current knowledge of the extension I would have to create a schedule (or use one I st up for this use-case) and adjust start and finish of it. I know I can do it with automation but my goal is to have all schedule related entities, rules, triggers in one place one component. Is something like that possible?

1 Like

Hello All.
Is there a way to group some schedules in order to switch them off with an automation ?
Here is my code in a file groups.yaml, but doesnā€™t seem to work.

Calendrier Confort:
name: calendrier_cft
entities:
- switch.schedule_lundi_cft
- switch.schedule_mardi_cft
- switch.schedule_mercredi_cft
- switch.schedule_jeudi_cft
- switch.schedule_vendredi_cft
- switch.schedule_week_end_cft

It should work the same as any other switch.
So I would expect that creating a group should do the job for you.
switch.turn_on and switch.turn_off are supported for the schedules.

Im having issues where when I set a schedule for my nest thermostats to regulate, it doesnā€™t do anything and just stays on the previous temperature. Does the regulate feature work with the schedule card?

Hi,

First of all thanks for this great scheduler ! For a while iā€™ve been playing with the scheduler with my Tuya0601 valves. Iā€™d like to use the scheduler to send an zigbee2mqtt command. After editing the yaml file iā€™ve come up with:

type: custom:scheduler-card
customize:
  climate.valve1:
    actions:
      - service: mqtt.publish
        data:
          topic: zigbee2mqtt/valve1/set/current_heating_setpoint
          payload: '29.5'
time_step: 1

Once i got it a bit working and saw a MQTT message passing in the log file. This was false formatted, but it was a message :smiley: I can not seem to get it working again to push any messages to the zigbee2mqtt service.

When i push this via an automation there is no problem and it works. The defenitive goal it to use the current_heating_setpoint to set the heatpoint directly in the scheduler (preferrably with a slider as the fan example).

Any help would be highly appreciated.

I love scheduler, but iā€™m running into an annoying issue. I use the Scheme to turn on and off some fish tank lighting. I started using broadlink w/ rf outlets for a new tank. This error happens at every startup:

home-assistant      | 2021-07-09 17:59:26 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall switch.turn_on (c:8de6b642bb90583f98972cbd068bdfab): entity_id=['switch.office_fish_tank_light']>
home-assistant      | Traceback (most recent call last):
home-assistant      |   File "/usr/src/homeassistant/homeassistant/core.py", line 1507, in catch_exceptions
home-assistant      |     await coro_or_task
home-assistant      |   File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
home-assistant      |     await handler.job.target(service_call)
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
home-assistant      |     await self.hass.helpers.service.entity_service_call(
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
home-assistant      |     future.result()  # pop exception if have
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 811, in async_request_call
home-assistant      |     await coro
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
home-assistant      |     await result
home-assistant      |   File "/usr/src/homeassistant/homeassistant/components/template/switch.py", line 185, in async_turn_on
home-assistant      |     await self._on_script.async_run(context=self._context)
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
home-assistant      |     await asyncio.shield(run.async_run())
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
home-assistant      |     await self._async_step(log_exceptions=False)
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
home-assistant      |     await getattr(self, handler)()
home-assistant      |   File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
home-assistant      |     await service_task
home-assistant      |   File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_call
home-assistant      |     raise ServiceNotFound(domain, service) from None
home-assistant      | homeassistant.exceptions.ServiceNotFound: Unable to find service remote.send_command

Is there any way of either remembering you already turned this on or off at startup? Or delaying startup actions until home assistant is fully loaded?

The regulate action has the same result as calling service climate.set_temperature with providing a low+high temperature setpoint.
The behaviour of regulating should be solved by your climate device itself.
Scheduler only shows the ā€˜regulateā€™ action for climate devices that advertise to support regulation with an interval (between min-max temperature).

Shouldnā€™t zigbee2mqtt make an climate entity for you for which you can call the climate.set_temperature service? It seems a bit hacky to me to have scheduler publish mqtt payloads directly.
It should work though. I suggest you to replace data by service_data though, as is described in the docs.

This is a classic ā€˜race conditionā€™. Scheduler is started before your broadlink integration was loaded. With time schemes, scheduler performs the action of the currently overlapping itmeslot directly after starting.
When calling a service with an entity, scheduler will check if that entity is already initialized.
For services without entity_id I did not build in some checking mechanism to see if the platform is already loaded.
Could you open a bug report for this here? That way we can follow-up on this. Thanks!

After editing the custom settings in HA i made the following changes:
HVAC options: [ā€œautoā€]
Preset modes"[ā€œmanualā€]

After changing this the option ā€œset temperatureā€ is visible in the scheduler. Without these settings the ā€œset temperatureā€ is not visible in scheduler:

Thanx for the quick reply, the ā€œset temperatureā€ makes the valve do what i want. Before i was playing with the heat option, but that did not work. When it is 20 degrees and i set it to heat 15 degrees, the vave stays open and the thermostate is set to 15 degrees :slight_smile: Enjoy the :coffee:

Hi all,

Having trouble with sensors not displaying as an option to include (Iā€™d like to include motion/precence sensors for condtions) anyone able to help?

You should be able to include the binary_sensor domain in the card (either by UI editor or by YAML).
It works the same as entity types which are used in actions for schedules.

Hi Neliss, I have been using this great component since the beginning and have no issues for the last few months. Really love all your work and itā€™s so stable :slight_smile: !

Do you plan to incorporate theming variables in the card component? I like using different scheduler cards throughout my dashboards so I would love to change the icon colors. Currently Iā€™m trying this with card-mod, butā€™s itā€™s hit and miss. Some parts I can change easily, while other parts (like icon colors) I have to dig really deep and still fail. I would love theming like mini-media-player-card. You can set variables inside the card, which alter the theme.

Ofcourse, this is no priority and if you ever have some time free, I would love seeing this :slight_smile:

1 Like