mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Convert number value to int in Xiaomi Miio (#55145)
This commit is contained in:
parent
ca245f8e93
commit
8d3ccad38e
@ -183,7 +183,7 @@ class XiaomiNumberEntity(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."""
|
||||||
method = getattr(self, self.entity_description.method)
|
method = getattr(self, self.entity_description.method)
|
||||||
if await method(value):
|
if await method(int(value)):
|
||||||
self._attr_value = value
|
self._attr_value = value
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user