Scheduler card/custom component

I am getting the following error in logs:

Logger: homeassistant
Source: custom_components/scheduler/datacollection.py:163
First occurred: 12:41:57 AM (1 occurrences)
Last logged: 12:41:57 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/scheduler/__init__.py", line 126, in async_start_schedules
    await self._startup_listeners.pop()()
  File "/config/custom_components/scheduler/switch.py", line 419, in async_startup_finished
    await self.async_start_timer()
  File "/config/custom_components/scheduler/switch.py", line 248, in async_start_timer
    (self._entry, timestamp) = self.dataCollection.get_next_entry()
  File "/config/custom_components/scheduler/datacollection.py", line 163, in get_next_entry
    closest_timestamp = reduce(
TypeError: reduce() of empty sequence with no initial value

Any idea what’s causing it and a fix?

You have a problematic schedule. You’ll have to manually delete it, but I don’t know how you’d do that.

Yeah
 the thing has zero entries (tasks).
The card is supposed to hide the save button when you have no task assigned.
Could you share a screenshot of the attributes of this schedule entity?

Thank you very much for resolving your browser blocking error. Version 1.9.3 works perfectly. No page freezing. Thank you again because now I can use the Scheduler to my satisfaction.

1 Like

You might find some use for this @neliss


Also do you think flakehell would be useful for this project?

There seems to be a problem in the display of the next start on DAYS and WORKDAYS.

image
No display next start
image

image
No display next start
image

image
Display next start on
image

image
Display next start on
image

@KTibow I’m familiar with that list.
It’s also included in the custom-card-helpers.
I decided to add only icons for domains of which scheduler has built-in actions for.
The real difficult part is finding appropriate icons for every action


No it’s related to translation of time.
Any schedule that is due within ~6 hours shows up as empty for some languages. Try changing your HA language, perhaps it shows up already.
Ofcourse you can choose to show normal time instead of countdown (via display_options)


OK, I understand, I set it up in English and it’s OK.

I am running HA inside docker, and I installed both scheduler card and custom component through HACS and they both appear to be installed (at least that’s what HACS shows), but looks like I am stuck at this point. I tried adding a card but I don’t see anything that mentions scheduler.

Needless to say, I am new to HA and I am still finding my way around - hence possibly a silly question.

What am I missing?

Sounds like you didn’t install the “integration” from the configuration UI

Configuration -> Integrations -> + (Add Integration)

Thanks for that, I did miss that step
 that’s done now, but I still don’t see an option to add a scheduler card on my dashboard. The scheduler integrations shows with just one device and no entities.

I did reload HA, refresh the browser and even reinstalled scheduler-card, but still nothing.

Thanks,
Miroslav

For every backend component you have to add it from integration, for every frontend component you have to add it from Configuration > Lovelace > Resources

Example for the scheduler installed from HACS

1 Like

I don’t have Configuration -> Lovelace - I can only see Configuration -> Lovelace Dashboards - and I don’t see Resources there?

Lovelace Dashboards is OK (is what @gromy meant)

In that case you need to go to your HA profile (bottom left on the screen), and enable “Advanced Mode”.
And then try again.

Apparently, adding custom cards is already an advanced feature :sunglasses:

Duh
 I activated the advanced mode long time ago
 did not even know what it would add :smiley:

Lovelace Dashboards > Resources is here, once you can access it

Thanks for that - Advanced mode activated, and resource for scheduler card added as in installation instructions

I restarted HA and reloaded/refreshed, but still can’t see Scheduler Card when I try to add a new card.

I’m not familiar with /hacfiles/ .
Make sure the directory exists.
Should it be /hacsfiles/ instead? (I don’t use HACS personally)

Rebooting HA is not needed (also not when updating the card), just reload the resources from the top menu.

Capture5

Yay - you are correct, there is no hacfiles, it should be hacsfiles, it was a typo.

And I can now create a Scheduler Card!

Thanks very much for your help, appreciated.

Cheers,
Miroslav

Hi !
First, thank you for this amazing component. It really is an awesome piece of work !

I’m still getting the hang of this tool and haven’t really gone in detail in all the configuration options.

I’m simply trying to set a schedule for a thermostat (generic_thermostat).


When it is time to switch ON the heating, I can see the target temp changing, but the hvac_mode doesnt’t switch to heat and stays off :confused:
The other way works (if the heat is on, the scheduler will switch it off)
No error in the logs.

For info here is my generic_thermostat (I’m not including the scheduler code, I just put some enitities in there and used the GUI to set everything)

- platform: generic_thermostat
  name: Thermostat sdb rdc
  heater: input_boolean.switch_radiateur_sdb_rdc
  target_sensor: sensor.temperature_sdb_rdc
  min_temp: 15
  max_temp: 24
  ac_mode: false
  target_temp: 19.5
  cold_tolerance: 0.3
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 30
  initial_hvac_mode: "off"
  away_temp: 16
  precision: 0.1

Thank you ! :slight_smile: