From 35e3bf3a94d9a850fd9780795612ee565bbd3d36 Mon Sep 17 00:00:00 2001 From: Alone Date: Sun, 25 Aug 2024 20:57:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=95=B9=EF=B8=8F=20fix=20deprecated=20for?= =?UTF-8?q?=20remote=20(#1613=20#1658)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/remote.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/xiaomi_miot/remote.py b/custom_components/xiaomi_miot/remote.py index fb509b97e..7789c4b2a 100644 --- a/custom_components/xiaomi_miot/remote.py +++ b/custom_components/xiaomi_miot/remote.py @@ -11,6 +11,7 @@ from homeassistant.components.remote import ( DOMAIN as ENTITY_DOMAIN, RemoteEntity, + RemoteEntityFeature, ) from . import ( @@ -78,6 +79,7 @@ def __init__(self, config, miot_spec: MiotSpec): token = config.get(CONF_TOKEN) self._device = ChuangmiIr(host, token) self._attr_should_poll = False + self._supported_features = RemoteEntityFeature.LEARN_COMMAND self._translations = get_translations('ir_devices') async def async_added_to_hass(self):