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
898 stars 113 forks source link

Shortcut buttons not working #539

Closed ppalyga closed 6 months ago

ppalyga commented 6 months ago

Describe the bug When trying to call the button press service on any of the shortcuts an error is displayed:

"Detected that custom integration 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 648: self.async_write_ha_state(). Please report it to the author of the 'dreame_vacuum' custom integration."

To Reproduce

  1. Create a shortcut in Dream Home app.
  2. Got to the device in Home Assistant and find the shortcut button in the list of entities.
  3. Try pressing it.

Expected behavior Shortcut button is pressed without an error and shortcut action runs.

Screenshots image

Additional Information

Tasshack commented 6 months ago

https://github.com/Tasshack/dreame-vacuum/issues/529