romedtino / simple-wyze-vac

Home Assistant Custom Component for Wyze Vacuum
49 stars 8 forks source link

Map as a built in camera entity #23

Closed romedtino closed 2 years ago

romedtino commented 2 years ago

closed in #28

dnestico commented 1 year ago

Just wondering before I use this, I want to make a notification using the blueprint that sends a notification with the camera entity aka the map after it is done cleaning.

Should I put a delay on the notification to make sure the map updates first? Or does the map update as soon as it finishes cleaning?

romedtino commented 1 year ago

Simple Wyze Vacuum updates by default are not automatic due to how Wyze allows access to their private API. If you enabled polling, the map would update when the poll finishes. Once you know the vacuum is done cleaning (could maybe check if the vacuum status is docked), you can do a service call to call update on the vacuum which will refresh the map. Feel free to give it maybe 5 seconds which I think should be more than adequate delay to get a new map. The map it gets will depend on how fast the Wyze vacuum update that data which usually is relatively fast. The service YAML would look something like this -

service: vacuum.send_command
data:
  command: update
target:
  entity_id: vacuum.wyzevac