[X] I checked for similar existing issues (both open and closed) before posting.
[X] I will participate in further discussion about this issue and can help by testing (if requested).
Card Version
v3.5.1 (latest)
Component Version
3.3.2
Bug description
After upgrading HA to 2024.03, scheduler-card integration started crashing when using the service call (scheduler.add) and then navigating to the card.
Screenshot from browser console:
The following errors appear in the system log right after calling the service:
Logger: homeassistant
Source: util/timeout.py:469
First occurred: 10:48:52 PM (1 occurrences)
Last logged: 10:48:52 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 625, in async_add_entities
await add_func(coros, entities, timeout)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 573, in _async_add_entities
async with self.hass.timeout.async_timeout(timeout, self.domain):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/timeout.py", line 469, in async_timeout
current_task: asyncio.Task[Any] | None = asyncio.current_task()
^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
Logger: py.warnings
Source: helpers/entity_platform.py:350
First occurred: 10:48:52 PM (1 occurrences)
Last logged: 10:48:52 PM
/usr/local/lib/python3.12/asyncio/tasks.py:865: RuntimeWarning: coroutine 'EntityPlatform._async_add_entity' was never awaited def shield(arg):
Logger: homeassistant.util.logging
Source: util/logging.py:102
First occurred: 10:52:21 PM (1 occurrences)
Last logged: 10:52:21 PM
Exception in async_timer_updated when dispatching 'scheduler_timer_updated': ('639431',) Traceback (most recent call last): File "/config/custom_components/scheduler/switch.py", line 168, in async_timer_updated self._next_entries = self._timer_handler.slot_queue ^^^^^^^^^^^^^^^^^^^ AttributeError: 'ScheduleEntity' object has no attribute '_timer_handler'
This one starts appearing and bombarding the logs with tens of log messages per second (notice 940 occurrences):
Logger: frontend.js.latest.202403070
Source: components/system_log/init.py:306
First occurred: 10:51:18 PM (940 occurrences)
Last logged: 10:52:21 PM
Uncaught error from Chrome 123.0.0.0 on Windows 10 TypeError: Cannot read properties of undefined (reading 'every') _o (/hacsfiles/scheduler-card/scheduler-card.js:1826:597) /hacsfiles/scheduler-card/scheduler-card.js:1826:4066 /hacsfiles/scheduler-card/scheduler-card.js:1826:4056
Steps to reproduce
Have HA 2024.03 installed
Have scheduler card version v.3.5.1 and component 3.3.2 installed
Go to Developer tools > Services
Paste in the following service call (change entity to any random light):
5. Observe the logs - errors have started appearing
6. Navigate to the scheduler card - notice that it doesn't appear, and logs have started appearing in the browser console
To recover from this you can either:
A. Restart HA
B. Reload the integration and refresh the browser tab that had the scheduler card open
### Additional info
_No response_
Checklist
Card Version
v3.5.1 (latest)
Component Version
3.3.2
Bug description
After upgrading HA to 2024.03, scheduler-card integration started crashing when using the service call (scheduler.add) and then navigating to the card.
Screenshot from browser console:
The following errors appear in the system log right after calling the service:
This one starts appearing and bombarding the logs with tens of log messages per second (notice 940 occurrences):
Steps to reproduce