Replace if in range check (#114107)

pull/114101/head^2
Marc Mueller 2024-03-24 15:20:00 +01:00 committed by GitHub
parent 3a3fb95454
commit 11faf4adcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

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