Skip to content

Commit 5bd89ac

Browse files
authored
Use typed config entry in Music Assistant (#155778)
1 parent 2b8db74 commit 5bd89ac

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

homeassistant/components/music_assistant/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,20 +238,24 @@ async def _client_listen(
238238
hass.async_create_task(hass.config_entries.async_reload(entry.entry_id))
239239

240240

241-
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
241+
async def async_unload_entry(
242+
hass: HomeAssistant, entry: MusicAssistantConfigEntry
243+
) -> bool:
242244
"""Unload a config entry."""
243245
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
244246

245247
if unload_ok:
246-
mass_entry_data: MusicAssistantEntryData = entry.runtime_data
248+
mass_entry_data = entry.runtime_data
247249
mass_entry_data.listen_task.cancel()
248250
await mass_entry_data.mass.disconnect()
249251

250252
return unload_ok
251253

252254

253255
async def async_remove_config_entry_device(
254-
hass: HomeAssistant, config_entry: ConfigEntry, device_entry: dr.DeviceEntry
256+
hass: HomeAssistant,
257+
config_entry: MusicAssistantConfigEntry,
258+
device_entry: dr.DeviceEntry,
255259
) -> bool:
256260
"""Remove a config entry from a device."""
257261
player_id = next(

0 commit comments

Comments
 (0)