Prevent issues with config update of "Timer" integration (unknown "restore" key) (#69332)

pull/69338/head^2
Philip Allgaier 2022-04-05 21:22:03 +02:00 committed by GitHub
parent 433a946f62
commit da55c48cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -388,5 +388,5 @@ class Timer(RestoreEntity):
"""Handle when the config is updated."""
self._config = config
self._duration = cv.time_period_str(config[CONF_DURATION])
self._restore = config[CONF_RESTORE]
self._restore = config.get(CONF_RESTORE, DEFAULT_RESTORE)
self.async_write_ha_state()