Home Assistant Unofficial Reference 2024.12.1
util.py File Reference

Go to the source code of this file.

Namespaces

 homeassistant.components.recorder.util
 

Functions

None homeassistant.components.recorder.util._async_create_issue_deprecated_version (HomeAssistant hass, AwesomeVersion server_version, str dialect_name, AwesomeVersion min_version)
 
None homeassistant.components.recorder.util._async_create_mariadb_range_index_regression_issue (HomeAssistant hass, AwesomeVersion version)
 
None homeassistant.components.recorder.util._async_delete_issue_deprecated_version (HomeAssistant hass, str dialect_name)
 
datetime|None homeassistant.components.recorder.util._datetime_or_none (str value)
 
AwesomeVersion|None homeassistant.components.recorder.util._extract_version_from_server_response (str server_response)
 
AwesomeVersion homeassistant.components.recorder.util._extract_version_from_server_response_or_raise (str server_response)
 
NoReturn homeassistant.components.recorder.util._fail_unsupported_dialect (str dialect_name)
 
bool homeassistant.components.recorder.util._is_retryable_error (Recorder instance, OperationalError err)
 
_FuncOrMethType[_P, bool] homeassistant.components.recorder.util._P (_FuncOrMethType[_P, bool] job, str description, bool method)
 
Callable[[_FuncType[_P, bool]], _FuncType[_P, bool]] homeassistant.components.recorder.util._P (str description)
 
_FuncOrMethType[_P, _R] homeassistant.components.recorder.util._R (_FuncOrMethType[_P, _R] job, str description, int attempts, bool method)
 
Callable[[_FuncType[_P, _R]], _FuncType[_P, _R]] homeassistant.components.recorder.util._R (str description, int attempts)
 
NoReturn homeassistant.components.recorder.util._raise_if_version_unsupported (str server_version, str dialect_name, str minimum_version)
 
AwesomeVersion homeassistant.components.recorder.util._simple_version (str version)
 
None homeassistant.components.recorder.util.async_create_backup_failure_issue (HomeAssistant hass, datetime local_start_time)
 
bool homeassistant.components.recorder.util.async_migration_in_progress (HomeAssistant hass)
 
bool homeassistant.components.recorder.util.async_migration_is_live (HomeAssistant hass)
 
bool homeassistant.components.recorder.util.basic_sanity_check (SQLiteCursor cursor)
 
dict homeassistant.components.recorder.util.build_mysqldb_conv ()
 
str homeassistant.components.recorder.util.dburl_to_path (str dburl)
 
None homeassistant.components.recorder.util.end_incomplete_runs (Session session, datetime start_time)
 
list[Row] homeassistant.components.recorder.util.execute (Query qry, bool to_native=False, bool validate_entity_ids=True)
 
None homeassistant.components.recorder.util.execute_on_connection (DBAPIConnection dbapi_connection, str statement)
 
Sequence[Row]|Result homeassistant.components.recorder.util.execute_stmt_lambda_element (Session session, StatementLambdaElement stmt, datetime|None start_time=None, datetime|None end_time=None, int yield_per=DEFAULT_YIELD_STATES_ROWS, bool orm_rows=True)
 
Callable[[Exception], bool] homeassistant.components.recorder.util.filter_unique_constraint_integrity_error (Recorder instance, str row_type)
 
str|None homeassistant.components.recorder.util.get_index_by_name (Session session, str table_name, str index_name)
 
bool homeassistant.components.recorder.util.is_second_sunday (datetime date_time)
 
bool homeassistant.components.recorder.util.last_run_was_recently_clean (SQLiteCursor cursor)
 
None homeassistant.components.recorder.util.move_away_broken_database (str dbfile)
 
None homeassistant.components.recorder.util.periodic_db_cleanups (Recorder instance)
 
Any homeassistant.components.recorder.util.query_on_connection (DBAPIConnection dbapi_connection, str statement)
 
tuple[datetime|None, datetime|None] homeassistant.components.recorder.util.resolve_period (StatisticPeriod period_def)
 
None homeassistant.components.recorder.util.run_checks_on_open_db (str dbpath, SQLiteCursor cursor)
 
date homeassistant.components.recorder.util.second_sunday (int year, int month)
 
DatabaseEngine|None homeassistant.components.recorder.util.setup_connection_for_dialect (Recorder instance, str dialect_name, DBAPIConnection dbapi_connection, bool first_connection)
 
bool homeassistant.components.recorder.util.validate_or_move_away_sqlite_database (str dburl)
 
bool homeassistant.components.recorder.util.validate_sqlite_database (str dbpath)
 
Generator[None] homeassistant.components.recorder.util.write_lock_db_sqlite (Recorder instance)
 

Variables

 homeassistant.components.recorder.util._LOGGER
 
 homeassistant.components.recorder.util.DAYS_IN_WEEK
 
 homeassistant.components.recorder.util.DEFAULT_YIELD_STATES_ROWS
 
 homeassistant.components.recorder.util.FIRST_POSSIBLE_SUNDAY
 
 homeassistant.components.recorder.util.MARIA_DB_106
 
 homeassistant.components.recorder.util.MARIA_DB_107
 
 homeassistant.components.recorder.util.MARIA_DB_108
 
 homeassistant.components.recorder.util.MARIADB_WITH_FIXED_IN_QUERIES_105
 
 homeassistant.components.recorder.util.MARIADB_WITH_FIXED_IN_QUERIES_106
 
 homeassistant.components.recorder.util.MARIADB_WITH_FIXED_IN_QUERIES_107
 
 homeassistant.components.recorder.util.MARIADB_WITH_FIXED_IN_QUERIES_108
 
 homeassistant.components.recorder.util.MAX_RESTART_TIME
 
 homeassistant.components.recorder.util.MIN_VERSION_MARIA_DB
 
 homeassistant.components.recorder.util.MIN_VERSION_MYSQL
 
 homeassistant.components.recorder.util.MIN_VERSION_PGSQL
 
 homeassistant.components.recorder.util.MIN_VERSION_SQLITE
 
 homeassistant.components.recorder.util.MIN_VERSION_SQLITE_MODERN_BIND_VARS
 
 homeassistant.components.recorder.util.minutes
 
 homeassistant.components.recorder.util.PERIOD_SCHEMA
 
 homeassistant.components.recorder.util.QUERY_RETRY_WAIT
 
 homeassistant.components.recorder.util.RECOMMENDED_MIN_VERSION_MARIA_DB
 
 homeassistant.components.recorder.util.RECOMMENDED_MIN_VERSION_MARIA_DB_106
 
 homeassistant.components.recorder.util.RECOMMENDED_MIN_VERSION_MARIA_DB_107
 
 homeassistant.components.recorder.util.RECOMMENDED_MIN_VERSION_MARIA_DB_108
 
 homeassistant.components.recorder.util.RETRIES
 
 homeassistant.components.recorder.util.RETRYABLE_MYSQL_ERRORS
 
 homeassistant.components.recorder.util.SQLITE3_POSTFIXES
 
 homeassistant.components.recorder.util.SUNDAY_WEEKDAY
 
 homeassistant.components.recorder.util.UPCOMING_MIN_VERSION_SQLITE