Skip to content

Commit

Permalink
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions custom_components/valetudo_vacuum_camera/manifest.json
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/sca075/valetudo_vacuum_camera/issues",
"requirements": [
"pillow==10.2.0",
"pillow==10.3.0",
"numpy",
"svgwrite==1.4.3"
],
"version": "2024.04.0"
"version": "2024.04.1"
}
Original file line number Diff line number Diff line change
@@ -266,9 +266,9 @@ def extract_room_properties(self, json_data: JsonType, destinations: JsonType):
for zone in zones_data:
zone_name = zone.get("name")
coordinates = zone.get("coordinates")
coordinates[0].pop()
x1, y1, x2, y2 = coordinates[0]
if coordinates:
if coordinates and len(coordinates) > 0:
coordinates[0].pop()
x1, y1, x2, y2 = coordinates[0]
zone_properties[zone_name] = {
"zones": coordinates,
"name": zone_name,
@@ -279,9 +279,9 @@ def extract_room_properties(self, json_data: JsonType, destinations: JsonType):
id_count = 1
for point in points_data:
point_name = point.get("name")
coordinates = point.get("coordinates")
x1, y1 = coordinates
if coordinates:
if coordinates and len(coordinates) > 0:
coordinates = point.get("coordinates")
x1, y1 = coordinates
point_properties[id_count] = {
"position": coordinates,
"name": point_name,
@@ -655,8 +655,6 @@ async def async_get_robot_in_room(
last_room = self.robot_in_room
for room in self.rooms_pos:
corners = room["corners"]
_LOGGER.debug(corners)
_LOGGER.debug(f"{robot_x}, {robot_y}")
self.robot_in_room = {
"id": room_count,
"left": corners[0][0],

0 comments on commit 4d3c760

Please sign in to comment.