diff --git a/custom_components/mqtt_vacuum_camera/manifest.json b/custom_components/mqtt_vacuum_camera/manifest.json index cf1f3f25..1d12f5fb 100755 --- a/custom_components/mqtt_vacuum_camera/manifest.json +++ b/custom_components/mqtt_vacuum_camera/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/sca075/mqtt_vacuum_camera/issues", "requirements": ["pillow>=10.3.0,<=11.0.0", "numpy"], - "version": "2024.12.0" + "version": "2024.12.1" } diff --git a/custom_components/mqtt_vacuum_camera/valetudo/MQTT/connector.py b/custom_components/mqtt_vacuum_camera/valetudo/MQTT/connector.py index f569b750..2bcd9d9d 100755 --- a/custom_components/mqtt_vacuum_camera/valetudo/MQTT/connector.py +++ b/custom_components/mqtt_vacuum_camera/valetudo/MQTT/connector.py @@ -410,6 +410,9 @@ async def async_message_received(self, msg) -> None: # When IPV4 and IPV6 are available, use IPV4 if vacuum_host_ip.split(",").__len__() > 1: self._shared.vacuum_ips = vacuum_host_ip.split(",")[0] + else: + # Use IPV4 when no IPV6 without split + self._shared.vacuum_ips = vacuum_host_ip _LOGGER.debug(f"Vacuum IPs: {self._shared.vacuum_ips}") async def async_subscribe_to_topics(self) -> None: diff --git a/custom_components/mqtt_vacuum_camera/valetudo/hypfer/image_draw.py b/custom_components/mqtt_vacuum_camera/valetudo/hypfer/image_draw.py index a1778beb..50cbabc1 100755 --- a/custom_components/mqtt_vacuum_camera/valetudo/hypfer/image_draw.py +++ b/custom_components/mqtt_vacuum_camera/valetudo/hypfer/image_draw.py @@ -126,14 +126,14 @@ async def async_draw_obstacle( self.img_h.shared.obstacles_data = compose_obstacle_links( self.img_h.shared.vacuum_ips, obstacle_objects ) - elif self.img_h.shared.vacuum_api: + elif self.img_h.shared.vacuum_api: # Fall back to API usage if no IP. self.img_h.shared.obstacles_data = compose_obstacle_links( self.img_h.shared.vacuum_api.split("http://")[1], obstacle_objects ) # Draw obstacles on the map if obstacle_objects: - _LOGGER.debug(f"{self.file_name} All obstacle detected: {obstacle_objects}") + _LOGGER.debug(f"{self.file_name} Obstacle detected.") self.img_h.draw.draw_obstacles(np_array, obstacle_objects, color_no_go) return np_array