diff --git a/pyneato/account.py b/pyneato/account.py index 97f87b8..7ba58b2 100644 --- a/pyneato/account.py +++ b/pyneato/account.py @@ -73,6 +73,7 @@ def __init__(self, session: Session): self._session = session self._robots = [] self._floorplans = [] + self._floorplans_initialized = False self._userdata = set() @property @@ -92,7 +93,7 @@ def floorplans(self) -> List[Floorplan]: """ Return set of floorplans for logged in account. """ - if not self._floorplans: + if not self._floorplans and not self._floorplans_initialized: self.refresh_floorplans() return self._floorplans @@ -158,6 +159,8 @@ def refresh_floorplans(self): for robot in self.robots: self.get_floorplan(robot) + self._floorplans_initialized = True + def get_floorplan(self, robot: Robot): _LOGGER.debug("Getting floorplan for %s", robot.name) diff --git a/pyproject.toml b/pyproject.toml index ec99317..0d635df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pyneato" -version = "0.0.6" +version = "0.0.7" authors = [ { name="Benjamin Paap", email="benjamin.paap@gmail.com" }, ] diff --git a/setup.py b/setup.py index 14814bb..41d8f82 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="pyneato", - version="0.0.6", + version="0.0.7", description="Python package for controlling Neato pyneato Connected vacuum robot", long_description=long_description, long_description_content_type="text/markdown",