Prevent issues with setting up "Timer" integration (unknown "restore" key) (#68936)

* Prevent issues with setting up "Timer" for existing entities

* Use default constant

* Update homeassistant/components/timer/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Philip Allgaier 2022-03-31 16:57:52 +02:00 committed by GitHub
parent 2c66ac6203
commit 398db35334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ class Timer(RestoreEntity):
self._remaining: timedelta | None = None
self._end: datetime | None = None
self._listener: Callable[[], None] | None = None
self._restore: bool = self._config[CONF_RESTORE]
self._restore: bool = self._config.get(CONF_RESTORE, DEFAULT_RESTORE)
self._attr_should_poll = False
self._attr_force_update = True