Do not use async_config_entry_first_refresh in fronius (#128153)

pull/126611/head^2
epenet 2024-10-11 12:49:01 +02:00 committed by GitHub
parent 4c1b7add39
commit cb02c723e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -199,7 +199,10 @@ class FroniusSolarNet:
name=_inverter_name,
inverter_info=_inverter_info,
)
await _coordinator.async_config_entry_first_refresh()
if self.config_entry.state == ConfigEntryState.LOADED:
await _coordinator.async_refresh()
else:
await _coordinator.async_config_entry_first_refresh()
self.inverter_coordinators.append(_coordinator)
# Only for re-scans. Initial setup adds entities through sensor.async_setup_entry