From e06ea5e03e2cf4b97d19c9ea08e3d0cd40716dec Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 13 May 2022 16:19:26 -0400 Subject: [PATCH] Remove deprecated history function entry points (#71815) --- homeassistant/components/history/__init__.py | 28 -------------------- 1 file changed, 28 deletions(-) diff --git a/homeassistant/components/history/__init__.py b/homeassistant/components/history/__init__.py index 17b983e11c1..e5b6c99eb2a 100644 --- a/homeassistant/components/history/__init__.py +++ b/homeassistant/components/history/__init__.py @@ -29,7 +29,6 @@ from homeassistant.components.websocket_api.const import JSON_DUMP from homeassistant.const import CONF_DOMAINS, CONF_ENTITIES, CONF_EXCLUDE, CONF_INCLUDE from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv -from homeassistant.helpers.deprecation import deprecated_class, deprecated_function from homeassistant.helpers.entityfilter import ( CONF_ENTITY_GLOBS, INCLUDE_EXCLUDE_BASE_FILTER_SCHEMA, @@ -60,28 +59,6 @@ CONFIG_SCHEMA = vol.Schema( ) -@deprecated_function("homeassistant.components.recorder.history.get_significant_states") -def get_significant_states(hass, *args, **kwargs): - """Wrap get_significant_states_with_session with an sql session.""" - return history.get_significant_states(hass, *args, **kwargs) - - -@deprecated_function( - "homeassistant.components.recorder.history.state_changes_during_period" -) -def state_changes_during_period(hass, start_time, end_time=None, entity_id=None): - """Return states changes during UTC period start_time - end_time.""" - return history.state_changes_during_period( - hass, start_time, end_time=None, entity_id=None - ) - - -@deprecated_function("homeassistant.components.recorder.history.get_last_state_changes") -def get_last_state_changes(hass, number_of_states, entity_id): - """Return the last number_of_states.""" - return history.get_last_state_changes(hass, number_of_states, entity_id) - - async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the history hooks.""" conf = config.get(DOMAIN, {}) @@ -101,11 +78,6 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: return True -@deprecated_class("homeassistant.components.recorder.models.LazyState") -class LazyState(history_models.LazyState): - """A lazy version of core State.""" - - def _ws_get_statistics_during_period( hass: HomeAssistant, msg_id: int,