fix: set the device on when the switch status is False or None (#1303)
Some checks failed
Tests / check-rule-format (push) Failing after 5s
Validate / validate-hassfest (push) Failing after 5s
Validate / validate-hacs (push) Failing after 11s
Validate / validate-lint (push) Failing after 3s
Validate / validate-setup (push) Failing after 5s

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

* feat: add a standalone switch for 090615.aircondition.ktf

* fix: add an alongside switch for juhl.aircondition.hvac (#1287)
This commit is contained in:
Li Shuzhen
2025-07-30 15:15:28 +08:00
committed by GitHub
parent dae63657d7
commit f3abbef94c
3 changed files with 40 additions and 2 deletions

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)