nielsfaber / scheduler-component

Custom component for HA that enables the creation of scheduler entities
GNU General Public License v3.0
675 stars 45 forks source link

Error in latest release when disabling schedule via service switch.turn_off #365

Closed Krusenbaum closed 4 months ago

Krusenbaum commented 4 months ago

Checklist

Expected behavior

I expected the schedule to disable without error messages

Actual behavior

I receive this error 2024-07-08 18:23:25.830 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140551483057792] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/scheduler/switch.py", line 465, in async_turn_on await self.coordinator.async_edit_schedule( TypeError: object NoneType can't be used in 'await' expression

Steps to Reproduce

Disable schedule via dashboard

nielsfaber commented 4 months ago

Duplicate of #363