We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c20d2fa commit ba09f98Copy full SHA for ba09f98
custom_components/hpprinter/managers/ha_coordinator.py
@@ -1,6 +1,7 @@
1
import logging
2
import sys
3
4
+from homeassistant.config_entries import ConfigEntryState
5
from homeassistant.core import Event, callback
6
from homeassistant.helpers.dispatcher import (
7
async_dispatcher_connect,
@@ -88,7 +89,10 @@ async def initialize(self):
88
89
90
await self._api.initialize()
91
- await self.async_config_entry_first_refresh()
92
+ if entry.state == ConfigEntryState.LOADED:
93
+ await self.async_refresh()
94
+ else:
95
+ await self.async_config_entry_first_refresh()
96
97
def _load_signal_handlers(self):
98
loop = self.hass.loop
0 commit comments