mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-18 08:00:42 +08:00
fix: set the air conditioner on if its switch status property is False or None (#1277)
This commit is contained in:
parent
8cbb451153
commit
d9869e066d
@ -546,7 +546,7 @@ class AirConditioner(FeatureOnOff, FeatureTargetTemperature,
|
|||||||
f'{self.entity_id}')
|
f'{self.entity_id}')
|
||||||
return
|
return
|
||||||
# set the device on
|
# set the device on
|
||||||
if self.get_prop_value(prop=self._prop_on) is False:
|
if self.get_prop_value(prop=self._prop_on) is not True:
|
||||||
await self.set_property_async(prop=self._prop_on,
|
await self.set_property_async(prop=self._prop_on,
|
||||||
value=True,
|
value=True,
|
||||||
write_ha_state=False)
|
write_ha_state=False)
|
||||||
|
|||||||
@ -168,7 +168,7 @@ class WaterHeater(MIoTServiceEntity, WaterHeaterEntity):
|
|||||||
if operation_mode == STATE_ON:
|
if operation_mode == STATE_ON:
|
||||||
await self.set_property_async(prop=self._prop_on, value=True)
|
await self.set_property_async(prop=self._prop_on, value=True)
|
||||||
return
|
return
|
||||||
if self.get_prop_value(prop=self._prop_on) is False:
|
if self.get_prop_value(prop=self._prop_on) is not True:
|
||||||
await self.set_property_async(prop=self._prop_on,
|
await self.set_property_async(prop=self._prop_on,
|
||||||
value=True,
|
value=True,
|
||||||
write_ha_state=False)
|
write_ha_state=False)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user