1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +00:00

Fix dangerous-default-value warnings in switchbot tests (#119575)

This commit is contained in:
epenet
2024-06-13 09:20:53 +02:00
committed by GitHub
parent 08403df20e
commit a06f098312

View File

@@ -36,19 +36,13 @@ def patch_async_setup_entry(return_value=True):
)
async def init_integration(
hass: HomeAssistant,
*,
data: dict = ENTRY_CONFIG,
skip_entry_setup: bool = False,
) -> MockConfigEntry:
async def init_integration(hass: HomeAssistant) -> MockConfigEntry:
"""Set up the Switchbot integration in Home Assistant."""
entry = MockConfigEntry(domain=DOMAIN, data=data)
entry = MockConfigEntry(domain=DOMAIN, data=ENTRY_CONFIG)
entry.add_to_hass(hass)
if not skip_entry_setup:
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
return entry