Tasshack / dreame-vacuum

Home Assistant integration for Dreame robot vacuums with map support
https://community.home-assistant.io/t/custom-component-dreame-vacuum
MIT License
777 stars 93 forks source link

Integration crashing on low water - L10S Ultra #206

Closed MichelFR closed 9 months ago

MichelFR commented 1 year ago

Describe the bug When the water gets low the integration crashes and does not work anymore. Im Running the beta

To Reproduce Wait till the water is low.

Expected behavior It should not crash and notify.

Screenshots

image image

Additional Information (please complete the following information)

Zver5 commented 12 months ago

I fix the same problem

  1. Model Name [e.g. dreame.vacuum.r2253]: X20 Pro plus
  2. Firmware Version [e.g. 1156]: 4.3.6_1406
  3. Home Assistant Version: Home Assistant 2023.9.2
  4. Configuration Type [With or without map support]: With map support
  5. Errors or warnings shown in the HA logs (if applicable): Log

2023-09-13 11:59:02.005 WARNING (MainThread) [custom_components.dreame_vacuum] Integration start failed: Traceback (most recent call last): File "/config/custom_components/dreame_vacuum/coordinator.py", line 471, in _async_update_data await self.hass.async_add_executor_job(self._device.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1937, in update self.connect_device() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1497, in connect_device self._request_properties() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 461, in _request_properties return self._handle_properties(results) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/device.py", line 428, in _handle_properties callback0 File "/config/custom_components/dreame_vacuum/coordinator.py", line 279, in _low_water_warning_changed low_water_warning = self._device.status.low_water_warning_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DreameVacuumDeviceStatus' object has no attribute 'low_water_warning_description'

2023-09-13 11:59:02.745 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Дюша Метёлкин' for dreame_vacuum integration not ready yet: 'DreameVacuumDeviceStatus' object has no attribute 'low_water_warning_description'; Retrying in background

Zver5 commented 12 months ago

Adding water, rebooting the robot and Home assist solve the problem

Tasshack commented 12 months ago

Issue causes integration to not to start when a low water warning is present on the device. States will not update if low water warning occures after the integration has started until warning is cleared. It will be fixed on v2.0.0b6.

Tasshack commented 11 months ago

Fixed on https://github.com/Tasshack/dreame-vacuum/releases/tag/v2.0.0b6

Tasshack commented 11 months ago

Looks like this issue was not fixed on the v2.0.0b6.

enkama commented 10 months ago

Reappeared for me now.

2023-11-06 22:44:44.971 INFO (MainThread) [custom_components.dreame_vacuum] Integration loading: Dreamy
2023-11-06 22:44:44.972 INFO (MainThread) [custom_components.dreame_vacuum] Integration starting...
2023-11-06 22:44:47.855 WARNING (MainThread) [custom_components.dreame_vacuum] Integration start failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 471, in _async_update_data
    await self.hass.async_add_executor_job(self._device.update)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1990, in update
    self.connect_device()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1518, in connect_device
    self._request_properties()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 464, in _request_properties
    return self._handle_properties(results)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 431, in _handle_properties
    callback[0](callback[1])
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 282, in _low_water_warning_changed
    {EVENT_LOW_WATER: description[0], "code": low_water_warning.value},
                      ^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'description' where it is not associated with a value
Tasshack commented 10 months ago

@enkama this will be fixed on v2.0.0b7.

DrBlokmeister commented 10 months ago

@enkama this will be fixed on v2.0.0b7.

ETA on release date? Rough estimate is OK (this week/next week/next month/early next year). This is something that my automations rely on, as my vacuums work based on area vacuumed today.

Tasshack commented 9 months ago

New version released. https://github.com/Tasshack/dreame-vacuum/releases/tag/v2.0.0b9

DrBlokmeister commented 9 months ago

It doesn't work for me. The integration doesn't crash, but the water level does not update after a refill. Restarting the integration does not work. I'll have a look later today to see how long it takes for the error to clear.

Tasshack commented 9 months ago

It doesn't work for me. The integration doesn't crash, but the water level does not update after a refill. Restarting the integration does not work. I'll have a look later today to see how long it takes for the error to clear.

Low water warning does not reset automatically, you have to dismiss the persistent notification or press button.clear_warning for clearing the low water warning from the device. Alternatively you can clear the warning from the app by dismissing its warning message.