mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 10:08:23 +00:00
Adjust humidifier
This commit is contained in:
parent
651f24d2df
commit
286467c7f8
@ -170,10 +170,20 @@ class TuyaHumidifierEntity(TuyaEntity, HumidifierEntity):
|
||||
|
||||
def turn_on(self, **kwargs: Any) -> None:
|
||||
"""Turn the device on."""
|
||||
if self._switch_dpcode is None:
|
||||
raise ServiceValidationError(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="action_dpcode_not_found",
|
||||
)
|
||||
self._send_command([{"code": self._switch_dpcode, "value": True}])
|
||||
|
||||
def turn_off(self, **kwargs: Any) -> None:
|
||||
"""Turn the device off."""
|
||||
if self._switch_dpcode is None:
|
||||
raise ServiceValidationError(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="action_dpcode_not_found",
|
||||
)
|
||||
self._send_command([{"code": self._switch_dpcode, "value": False}])
|
||||
|
||||
def set_humidity(self, humidity: int) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user