Replace if in range check (#114107)
This commit is contained in:
parent
3a3fb95454
commit
11faf4adcb
1 changed files with 1 additions and 1 deletions
|
@ -717,7 +717,7 @@ class Thermostat(ClimateEntity):
|
|||
|
||||
def set_humidity(self, humidity: int) -> None:
|
||||
"""Set the humidity level."""
|
||||
if humidity not in range(101):
|
||||
if not (0 <= humidity <= 100):
|
||||
raise ValueError(
|
||||
f"Invalid set_humidity value (must be in range 0-100): {humidity}"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue