Convert number value to int in Xiaomi Miio (#55145)

This commit is contained in:
Maciej Bieniek 2021-08-24 15:19:01 +02:00 committed by GitHub
parent ca245f8e93
commit 8d3ccad38e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,7 @@ class XiaomiNumberEntity(XiaomiCoordinatedMiioEntity, NumberEntity):
async def async_set_value(self, value):
"""Set an option of the miio device."""
method = getattr(self, self.entity_description.method)
if await method(value):
if await method(int(value)):
self._attr_value = value
self.async_write_ha_state()