Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling/enabling a scheduler throws an error after upgrading HA to 2024.7 #823

Closed
2 tasks done
adrian-bulicanu opened this issue Jul 7, 2024 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@adrian-bulicanu
Copy link

Checklist

  • I checked for similar existing issues (both open and closed) before posting.
  • I will participate in further discussion about this issue and can help by testing (if requested).

Card Version

v3.2.13

Component Version

v3.3.4

Bug description

Disabling/enabling a scheduler changes the slider state but throws the error TypeError: object NoneType can't be used in an 'await' expression.

The logbook shows that the state was changed: Schedule XXX turned off, triggered by service Switch: Turn off.

Steps to reproduce

  1. Open dashboard
  2. Tap the slider on the card

Additional info

Callstack from the log:

2024-07-07 09:20:07.039 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140618067713408] 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 458, in async_turn_off
    await self.coordinator.async_edit_schedule(
TypeError: object NoneType can't be used in 'await' expression
@adrian-bulicanu adrian-bulicanu added the bug Something isn't working label Jul 7, 2024
@Noobalicious
Copy link

The updated scheduler component fixed it for me. Thanks, Niels!

@adrian-bulicanu
Copy link
Author

Updating the component version to v3.3.5 fixed the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants