Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change async_config_entry_first_refresh to async_refresh #2550

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/battery_notes/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ async def async_added_to_hass(self) -> None:

await super().async_added_to_hass()

await self.coordinator.async_config_entry_first_refresh()
await self.coordinator.async_refresh()

@callback
def _handle_coordinator_update(self) -> None:
Expand Down
4 changes: 1 addition & 3 deletions custom_components/battery_notes/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ async def async_registry_updated(event: Event[er.EventEntityRegistryUpdatedData]

async_add_entities(entities)

await coordinator.async_config_entry_first_refresh()


async def async_setup_platform(
hass: HomeAssistant,
Expand Down Expand Up @@ -510,7 +508,7 @@ async def _async_state_changed_listener(
self.coordinator.async_add_listener(self._handle_coordinator_update)
)

await self.coordinator.async_config_entry_first_refresh()
await self.coordinator.async_refresh()

@callback
def _handle_coordinator_update(self) -> None:
Expand Down
Loading