mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-04-03 08:15:30 +08:00
fix: bool value false
This commit is contained in:
parent
18283ed179
commit
ac5901bf1f
@ -263,8 +263,7 @@ class AirConditioner(MIoTServiceEntity, ClimateEntity):
|
|||||||
f'{self.entity_id}')
|
f'{self.entity_id}')
|
||||||
return
|
return
|
||||||
# set air-conditioner on
|
# set air-conditioner on
|
||||||
elif not self.get_prop_value(
|
elif self.get_prop_value(prop=self._prop_on) is False:
|
||||||
prop=self._prop_on):
|
|
||||||
await self.set_property_async(prop=self._prop_on, value=True)
|
await self.set_property_async(prop=self._prop_on, value=True)
|
||||||
# set mode
|
# set mode
|
||||||
mode_value = self.get_map_value(
|
mode_value = self.get_map_value(
|
||||||
@ -372,7 +371,7 @@ class AirConditioner(MIoTServiceEntity, ClimateEntity):
|
|||||||
@ property
|
@ property
|
||||||
def hvac_mode(self) -> Optional[HVACMode]:
|
def hvac_mode(self) -> Optional[HVACMode]:
|
||||||
"""Return the hvac mode. e.g., heat, cool mode."""
|
"""Return the hvac mode. e.g., heat, cool mode."""
|
||||||
if not self.get_prop_value(prop=self._prop_on):
|
if self.get_prop_value(prop=self._prop_on) is False:
|
||||||
return HVACMode.OFF
|
return HVACMode.OFF
|
||||||
return self.get_map_description(
|
return self.get_map_description(
|
||||||
map_=self._hvac_mode_map,
|
map_=self._hvac_mode_map,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user