mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Ring: Add partial back (#107040)
This commit is contained in:
parent
0183affc7c
commit
890615bb92
@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
@ -40,9 +41,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
def token_updater(token):
|
||||
"""Handle from sync context when token is updated."""
|
||||
hass.loop.call_soon_threadsafe(
|
||||
hass.config_entries.async_update_entry,
|
||||
entry,
|
||||
data={**entry.data, CONF_TOKEN: token},
|
||||
partial(
|
||||
hass.config_entries.async_update_entry,
|
||||
entry,
|
||||
data={**entry.data, CONF_TOKEN: token},
|
||||
)
|
||||
)
|
||||
|
||||
auth = ring_doorbell.Auth(
|
||||
|
Loading…
x
Reference in New Issue
Block a user