Skip to content

Commit

Permalink
fix: prevent flicker on updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlb committed Dec 16, 2024
1 parent cc60f62 commit fe89b67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions custom_components/ha_blueair/blueair_update_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ def __init__(
immediate=False,
)

async def refresh() -> BlueAirApiDevice | BlueAirAwsDevice:
await self.blueair_api_device.refresh()
return self.blueair_api_device

super().__init__(
hass,
_LOGGER,
name=f"{DOMAIN}-{self.blueair_api_device.name}",
update_interval=timedelta(minutes=5),
update_method=self.blueair_api_device.refresh,
request_refresh_debouncer=request_refresh_debouncer
update_method=refresh,
request_refresh_debouncer=request_refresh_debouncer,
always_update=False
)

@property
Expand Down

0 comments on commit fe89b67

Please sign in to comment.