diff --git a/SCR/valetudo_map_parser/config/types.py b/SCR/valetudo_map_parser/config/types.py index 26924f5..c97e517 100644 --- a/SCR/valetudo_map_parser/config/types.py +++ b/SCR/valetudo_map_parser/config/types.py @@ -123,6 +123,18 @@ def get_rooms_count(self) -> int: return count if count > 0 else DEFAULT_ROOMS return DEFAULT_ROOMS + @property + def room_names(self) -> dict: + """Return room names in format {'room_0_name': 'SegmentID: RoomName', ...}.""" + result = {} + if isinstance(self.vacuums_data, dict): + for idx, (segment_id, room_data) in enumerate(self.vacuums_data.items()): + if idx >= 16: # Max 16 rooms + break + room_name = room_data.get("name", f"Room {segment_id}") + result[f"room_{idx}_name"] = f"{segment_id}: {room_name}" + return result + @classmethod def get_all_instances(cls) -> Dict[str, "RoomStore"]: return cls._instances diff --git a/pyproject.toml b/pyproject.toml index ad689b4..5487ce7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "valetudo-map-parser" -version = "0.1.11b1" +version = "0.1.11" description = "A Python library to parse Valetudo map data returning a PIL Image object." authors = ["Sandro Cantarella "] license = "Apache-2.0"