Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor icon indicating copy to clipboard operation
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard

Separation between the camera component and data provider

Open elad-bar opened this issue 3 years ago • 5 comments

  • Add vacuum manager to handle all the logic
  • Camera component will use the latest state of the vacuum manager
  • Map status to log messages - every time status is being changed, it will be logged accordingly, no need to call logger
  • Map device to handlers instead of IF statement

elad-bar avatar May 24 '22 13:05 elad-bar

It looks quite nice. I thought about using built-in coordinator though: https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/update_coordinator.py

PiotrMachowski avatar May 24 '22 13:05 PiotrMachowski

I wanted it to be simple as possible so didn't add new elements just separation and cleanup, but correct, next step is to wrap it as coordinator

elad-bar avatar May 24 '22 13:05 elad-bar

That's an easy change :) I will take a look at it 👍 thank you!

PiotrMachowski avatar May 24 '22 13:05 PiotrMachowski

@PiotrMachowski any updates about that PR?

thanks

elad-bar avatar Jan 05 '23 07:01 elad-bar

@elad-bar I plan to make a lot of maintenance on all my repos soon, sorry for long wait, I have a lot of other repos to maintain

PiotrMachowski avatar Jan 05 '23 11:01 PiotrMachowski