From e51945f43a417da991904820152d62148f2535ad Mon Sep 17 00:00:00 2001 From: Hmmbob <33529490+hmmbob@users.noreply.github.com> Date: Sun, 31 Dec 2023 14:46:20 +0100 Subject: [PATCH 1/2] Replace deprecated constant --- custom_components/xiaomi_cloud_map_extractor/camera.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/xiaomi_cloud_map_extractor/camera.py b/custom_components/xiaomi_cloud_map_extractor/camera.py index 0568631..9f13a46 100644 --- a/custom_components/xiaomi_cloud_map_extractor/camera.py +++ b/custom_components/xiaomi_cloud_map_extractor/camera.py @@ -15,7 +15,7 @@ from miio import Vacuum as RoborockVacuum, DeviceException import PIL.Image as Image import voluptuous as vol -from homeassistant.components.camera import Camera, ENTITY_ID_FORMAT, PLATFORM_SCHEMA, SUPPORT_ON_OFF +from homeassistant.components.camera import Camera, CameraEntityFeature, ENTITY_ID_FORMAT, PLATFORM_SCHEMA from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_TOKEN, CONF_USERNAME from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity import generate_entity_id @@ -205,8 +205,8 @@ def turn_off(self): self._should_poll = False @property - def supported_features(self) -> int: - return SUPPORT_ON_OFF + def supported_features(self): + return CameraEntityFeature.ON_OFF @property def extra_state_attributes(self) -> Dict[str, Any]: From 30384d8ecdc9f2f101df684f7c0581ae1f356f55 Mon Sep 17 00:00:00 2001 From: Hmmbob <33529490+hmmbob@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:36:22 +0100 Subject: [PATCH 2/2] Sort manifest for hassfest --- .../xiaomi_cloud_map_extractor/manifest.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/xiaomi_cloud_map_extractor/manifest.json b/custom_components/xiaomi_cloud_map_extractor/manifest.json index 626c221..272574b 100644 --- a/custom_components/xiaomi_cloud_map_extractor/manifest.json +++ b/custom_components/xiaomi_cloud_map_extractor/manifest.json @@ -1,12 +1,13 @@ { "domain": "xiaomi_cloud_map_extractor", "name": "Xiaomi Cloud Map Extractor", - "documentation": "https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor", - "issue_tracker": "https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues", - "dependencies": [], "codeowners": [ "@PiotrMachowski" ], + "dependencies": [], + "documentation": "https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor", + "iot_class": "cloud_polling", + "issue_tracker": "https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues", "requirements": [ "pillow", "pybase64", @@ -14,6 +15,5 @@ "requests", "pycryptodome" ], - "version": "v2.2.0", - "iot_class": "cloud_polling" + "version": "v2.2.0" }