From ab2ff457264b628705a988d15a26f13f572e4d50 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 22 Oct 2021 14:25:36 +0200 Subject: [PATCH] Warn if state_changed events are excluded from recorder (#58021) --- homeassistant/components/recorder/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 471e86609ae..83652b7864c 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -249,6 +249,11 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ) exclude = conf[CONF_EXCLUDE] exclude_t = exclude.get(CONF_EVENT_TYPES, []) + if EVENT_STATE_CHANGED in exclude_t: + _LOGGER.warning( + "State change events are excluded, recorder will not record state changes." + "This will become an error in Home Assistant Core 2022.2" + ) instance = hass.data[DATA_INSTANCE] = Recorder( hass=hass, auto_purge=auto_purge,