Prevent ios sensor updates from running in the executor (#41986)

The update was only checking an existing dict
This commit is contained in:
J. Nick Koston 2020-10-17 08:38:42 -05:00 committed by GitHub
parent d9fbde4f6c
commit c0845a3650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class IOSSensor(Entity):
return icon_state
return icon_for_battery_level(battery_level=battery_level, charging=charging)
def update(self):
async def async_update(self):
"""Get the latest state of the sensor."""
self._device = ios.devices(self.hass).get(self._device_name)
self._state = self._device[ios.ATTR_BATTERY][self.type]