From 180f2dc98ed16dbc509a77af166807c0e96bd173 Mon Sep 17 00:00:00 2001 From: LiShuzhen Date: Mon, 24 Feb 2025 18:23:10 +0800 Subject: [PATCH] fix: electric-blanket service required property --- custom_components/xiaomi_home/climate.py | 2 +- custom_components/xiaomi_home/miot/specs/specv2entity.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/custom_components/xiaomi_home/climate.py b/custom_components/xiaomi_home/climate.py index 7acc2ae..91c4d9b 100644 --- a/custom_components/xiaomi_home/climate.py +++ b/custom_components/xiaomi_home/climate.py @@ -748,7 +748,7 @@ class ElectricBlanket(FeatureOnOff, FeatureTargetTemperature, """Initialize the heater.""" super().__init__(miot_device=miot_device, entity_data=entity_data) - self._attr_icon = 'mdi:radiator' + self._attr_icon = 'mdi:rug' # hvac modes self._attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF] # preset modes diff --git a/custom_components/xiaomi_home/miot/specs/specv2entity.py b/custom_components/xiaomi_home/miot/specs/specv2entity.py index 9d88619..1829ba2 100644 --- a/custom_components/xiaomi_home/miot/specs/specv2entity.py +++ b/custom_components/xiaomi_home/miot/specs/specv2entity.py @@ -302,12 +302,11 @@ SPEC_DEVICE_TRANS_MAP: dict = { 'required': { 'properties': { 'on': {'read', 'write'}, - 'target-temperature': {'read', 'write'}, - 'temperature': {'read'}, + 'target-temperature': {'read', 'write'} } }, 'optional': { - 'properties': {'mode'} + 'properties': {'mode', 'temperature'} }, } },