From 0ac9376ee48562fa9995faab9793a5447e0f93b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= <ludeeus@ludeeus.dev> Date: Fri, 18 Feb 2022 11:07:14 +0100 Subject: [PATCH] Add list to async_delay_save typing (#66795) --- homeassistant/helpers/storage.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/helpers/storage.py b/homeassistant/helpers/storage.py index af0c50ec5fa..554a88f4ad5 100644 --- a/homeassistant/helpers/storage.py +++ b/homeassistant/helpers/storage.py @@ -194,7 +194,11 @@ class Store: await self._async_handle_write_data() @callback - def async_delay_save(self, data_func: Callable[[], dict], delay: float = 0) -> None: + def async_delay_save( + self, + data_func: Callable[[], dict | list], + delay: float = 0, + ) -> None: """Save data with an optional delay.""" # pylint: disable-next=import-outside-toplevel from .event import async_call_later -- GitLab