mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-17 23:50: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}')
|
||||
return
|
||||
# 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,
|
||||
value=True,
|
||||
write_ha_state=False)
|
||||
|
||||
@ -168,7 +168,7 @@ class WaterHeater(MIoTServiceEntity, WaterHeaterEntity):
|
||||
if operation_mode == STATE_ON:
|
||||
await self.set_property_async(prop=self._prop_on, value=True)
|
||||
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,
|
||||
value=True,
|
||||
write_ha_state=False)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user