HAsmartirrigation: executing reset_all_buckets service in V2 throws error

What happened?

Reset_all_buckets srvice throws and error both on UI and in LOGS (pasted)

config_entry-smart_irrigation-0ccbefbed592d9fabbc576155498cb32.json.txt

How to reproduce

  1. IN HA go to Developer Tools>Services>
  2. pick service “Smart Irrigation: reset_all_buckets”
  3. Click EXECUTE
  4. Error comes up “Cannot execute smart_irrigation.reset_all_buckets. Unknown error”

Relevant log output

Logger: homeassistant.components.websocket_api.http.connection
Source: helpers/event.py:1578
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:43:09 (12 occurrences)
Last logged: 12:46:27

[546481490496]
[545702408512]
[545734356544] Error handling message: Unknown error (unknown_error) Jan from 80.253.213.7 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36)
[545734360000]
[545734360000] Error handling message: Unknown error (unknown_error) Jan from 80.253.213.7 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smart_irrigation/__init__.py", line 1072, in handle_reset_all_buckets
    await self._async_set_all_buckets(0)
  File "/config/custom_components/smart_irrigation/__init__.py", line 1008, in _async_set_all_buckets
    await self.async_update_zone_config(zone_id=zone.get(const.ZONE_ID),data=data)
  File "/config/custom_components/smart_irrigation/__init__.py", line 907, in async_update_zone_config
    self.register_start_event()
  File "/config/custom_components/smart_irrigation/__init__.py", line 920, in register_start_event
    self._track_sunrise_event_unsub()
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1578, in async_detach
    assert self._unsub_sun is not None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Which version are you running?

HA 2023.9.3 Smart Irrigation v2023.9.2

Diagnostics file

  • I have attached a diagnostics file

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 1
  • Comments: 16 (5 by maintainers)

Commits related to this issue

Most upvoted comments

IT SEEMS that all services are working now 😃 thank you!!