Skip to content

Common Vacuum Interface #1059

@stek29

Description

@stek29

Currently this library provides at least three different implementations for Vacuums (roborock, dreame and viomi) which are incompatible.
As mentioned in home-assistant/core#49188, best way to get different Vacuums into other projects (like Home Assistant) is to provide some kind of common interface for vacuums.

I see three ways to do that:

  1. create "abstract" interface for vacuums, then refactor existing vacuums to support that interface – might be backward incompatible?
  2. create "abstract" intrerface for vacuums, create implementations of that interface for each vacuum type to keep backward compatibility; if any new types of vacuums are added, they should implement that interface directly
  3. create common vacuum interface which acts as an adaptor for exact implementations: might be harder to maintain in future due to centralisation, but keeps backward compatibilty

Also, it'd be great to have some kind of "router" which automatically chooses correct implementation depending on device type – the easiest way to do that is by going with third way

What do you think? I'd be more than happy to make this happen, but it needs to be discussed and thought through first

Also, if I'm not mistaken, there's currently no common interfaces for any kind of device – we should keep that in mind when designing this, so solution is scalable to other kinds of devices.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions