Skip to content

Commit

Permalink
fix?: Another change to address possible thread/async race lockups
Browse files Browse the repository at this point in the history
  • Loading branch information
agittins committed May 19, 2024
1 parent 6d500c4 commit d93470e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/bermuda/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def device_new(address: str, scanners: list[str]) -> None:
entry.async_on_unload(async_dispatcher_connect(hass, SIGNAL_DEVICE_NEW, device_new))

# Now we must tell the co-ord to do initial refresh, so that it will call our callback.
await coordinator.async_config_entry_first_refresh()
# This runs inside the event loop so should be fine as-is.
# Disabling as it seems to work ok without, and it might be cause of async race.
# await coordinator.async_config_entry_first_refresh()


class BermudaSensor(BermudaEntity, SensorEntity):
Expand Down

0 comments on commit d93470e

Please sign in to comment.