fix: fan-level property in thermostat service

This commit is contained in:
LiShuzhen 2025-03-05 14:42:33 +08:00
parent 672e5b3f5d
commit 7aceb0493c

View File

@ -229,7 +229,9 @@ class FeatureFanMode(MIoTServiceEntity, ClimateEntity):
super().__init__(miot_device=miot_device, entity_data=entity_data)
# properties
for prop in entity_data.props:
if prop.name == 'fan-level' and prop.service.name == 'fan-control':
if (prop.name == 'fan-level' and
(prop.service.name == 'fan-control' or
prop.service.name == 'thermostat')):
if not prop.value_list:
_LOGGER.error('invalid fan-level value_list, %s',
self.entity_id)