Prevent ios sensor updates from running in the executor (#41986)
The update was only checking an existing dictpull/42004/head
parent
d9fbde4f6c
commit
c0845a3650
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue