Remove Xiaomi_miio number value validation (#53934)

pull/53947/head
Jan Bouwhuis 2021-08-04 12:50:08 +02:00 committed by GitHub
parent b77335d6f9
commit 1054419498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 9 deletions

View File

@ -108,15 +108,6 @@ class XiaomiAirHumidifierNumber(XiaomiCoordinatedMiioEntity, NumberEntity):
async def async_set_value(self, value): async def async_set_value(self, value):
"""Set an option of the miio device.""" """Set an option of the miio device."""
if (
self.min_value
and value < self.min_value
or self.max_value
and value > self.max_value
):
raise ValueError(
f"Value {value} not a valid {self.name} within the range {self.min_value} - {self.max_value}"
)
if await self.async_set_motor_speed(value): if await self.async_set_motor_speed(value):
self._attr_value = value self._attr_value = value
self.async_write_ha_state() self.async_write_ha_state()