File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -300,12 +300,11 @@ async def async_config_entry_first_refresh(self) -> None:
300300 to ensure that multiple retries do not cause log spam.
301301 """
302302 if self .config_entry is None :
303- report_usage (
304- "uses `async_config_entry_first_refresh`, which is only supported "
305- "for coordinators with a config entry" ,
306- breaks_in_ha_version = "2025.11" ,
303+ raise ConfigEntryError (
304+ "Detected code that uses `async_config_entry_first_refresh`,"
305+ " which is only supported for coordinators with a config entry"
307306 )
308- elif (
307+ if (
309308 self .config_entry .state
310309 is not config_entries .ConfigEntryState .SETUP_IN_PROGRESS
311310 ):
Original file line number Diff line number Diff line change @@ -663,10 +663,9 @@ async def test_async_config_entry_first_refresh_no_entry(hass: HomeAssistant) ->
663663 crd = get_crd (hass , DEFAULT_UPDATE_INTERVAL , None )
664664 crd .setup_method = AsyncMock ()
665665 with pytest .raises (
666- RuntimeError ,
667- match = "Detected code that uses `async_config_entry_first_refresh`, "
668- "which is only supported for coordinators with a config entry. "
669- "Please report this issue" ,
666+ ConfigEntryError ,
667+ match = "Detected code that uses `async_config_entry_first_refresh`,"
668+ " which is only supported for coordinators with a config entry" ,
670669 ):
671670 await crd .async_config_entry_first_refresh ()
672671
You can’t perform that action at this time.
0 commit comments