fix: electric-blanket service required property

This commit is contained in:
LiShuzhen 2025-02-24 18:23:10 +08:00
parent 4f1139ef3d
commit 180f2dc98e
2 changed files with 3 additions and 4 deletions

View File

@ -748,7 +748,7 @@ class ElectricBlanket(FeatureOnOff, FeatureTargetTemperature,
"""Initialize the heater.""" """Initialize the heater."""
super().__init__(miot_device=miot_device, entity_data=entity_data) super().__init__(miot_device=miot_device, entity_data=entity_data)
self._attr_icon = 'mdi:radiator' self._attr_icon = 'mdi:rug'
# hvac modes # hvac modes
self._attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF] self._attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
# preset modes # preset modes

View File

@ -302,12 +302,11 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'required': { 'required': {
'properties': { 'properties': {
'on': {'read', 'write'}, 'on': {'read', 'write'},
'target-temperature': {'read', 'write'}, 'target-temperature': {'read', 'write'}
'temperature': {'read'},
} }
}, },
'optional': { 'optional': {
'properties': {'mode'} 'properties': {'mode', 'temperature'}
}, },
} }
}, },