Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.recorder.system_health Namespace Reference

Namespaces

 mysql
 
 postgresql
 
 sqlite
 

Functions

dict[str, Any] _async_get_db_engine_info (Recorder instance)
 
dict[str, Any] _get_db_stats (Recorder instance, str database_name)
 
None async_register (HomeAssistant hass, system_health.SystemHealthRegistration register)
 
dict[str, Any] system_health_info (HomeAssistant hass)
 

Variables

dictionary DIALECT_TO_GET_SIZE
 

Detailed Description

Provide info to system health.

Function Documentation

◆ _async_get_db_engine_info()

dict[str, Any] homeassistant.components.recorder.system_health._async_get_db_engine_info ( Recorder  instance)
private
Get database engine info.

Definition at line 48 of file __init__.py.

◆ _get_db_stats()

dict[str, Any] homeassistant.components.recorder.system_health._get_db_stats ( Recorder  instance,
str  database_name 
)
private
Get the stats about the database.

Definition at line 34 of file __init__.py.

◆ async_register()

None homeassistant.components.recorder.system_health.async_register ( HomeAssistant  hass,
system_health.SystemHealthRegistration   register 
)
Register system health callbacks.

Definition at line 27 of file __init__.py.

◆ system_health_info()

dict[str, Any] homeassistant.components.recorder.system_health.system_health_info ( HomeAssistant  hass)
Get info for the info page.

Definition at line 58 of file __init__.py.

Variable Documentation

◆ DIALECT_TO_GET_SIZE

dictionary homeassistant.components.recorder.system_health.DIALECT_TO_GET_SIZE
Initial value:
1 = {
2  SupportedDialect.SQLITE: sqlite_db_size_bytes,
3  SupportedDialect.MYSQL: mysql_db_size_bytes,
4  SupportedDialect.POSTGRESQL: postgresql_db_size_bytes,
5 }

Definition at line 19 of file __init__.py.