fix: set the air conditioner on if its switch status property is False or None (#1277)

This commit is contained in:
LiShuzhen 2025-07-24 14:14:54 +08:00
parent 8cbb451153
commit d9869e066d
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)