mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-04-02 07:45:31 +08:00
fix: fan-level property in thermostat service
This commit is contained in:
parent
672e5b3f5d
commit
7aceb0493c
@ -189,7 +189,7 @@ class FeaturePresetMode(MIoTServiceEntity, ClimateEntity):
|
||||
for prop in self.entity_data.props:
|
||||
if prop.name == prop_name and prop.service.name == service_name:
|
||||
if not prop.value_list:
|
||||
_LOGGER.error('invalid %s %s value_list, %s',service_name,
|
||||
_LOGGER.error('invalid %s %s value_list, %s', service_name,
|
||||
prop_name, self.entity_id)
|
||||
continue
|
||||
self._mode_map = prop.value_list.to_map()
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user