mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Replace if in range check (#114107)
This commit is contained in:
parent
3a3fb95454
commit
11faf4adcb
@ -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…
x
Reference in New Issue
Block a user