Skip to content

Commit

Permalink
Fix lingering timer in withings (#93085)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed May 15, 2023
1 parent cf957f1 commit b38a7aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/withings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def async_call_later_callback(now) -> None:
)

# Start subscription check in the background, outside this component's setup.
async_call_later(hass, 1, async_call_later_callback)
entry.async_on_unload(async_call_later(hass, 1, async_call_later_callback))

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

Expand Down
6 changes: 5 additions & 1 deletion tests/components/withings/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ async def test_set_config_unique_id(

config_entry = MockConfigEntry(
domain=DOMAIN,
data={"token": {"userid": "my_user_id"}, "profile": person0.profile},
data={
"token": {"userid": "my_user_id"},
"auth_implementation": "withings",
"profile": person0.profile,
},
)

with patch("homeassistant.components.withings.async_get_data_manager") as mock:
Expand Down

0 comments on commit b38a7aa

Please sign in to comment.