Home Assistant Unofficial Reference 2024.12.1
system_health.py
Go to the documentation of this file.
1 """Provide info to system health."""
2 
3 from typing import Any
4 
5 from pydiscovergy.const import API_BASE
6 
7 from homeassistant.components import system_health
8 from homeassistant.core import HomeAssistant, callback
9 
10 
11 @callback
13  hass: HomeAssistant, register: system_health.SystemHealthRegistration
14 ) -> None:
15  """Register system health callbacks."""
16  register.async_register_info(system_health_info)
17 
18 
19 async def system_health_info(hass: HomeAssistant) -> dict[str, Any]:
20  """Get info for the info page."""
21  return {
22  "api_endpoint_reachable": system_health.async_check_can_reach_url(
23  hass, API_BASE
24  )
25  }
dict[str, Any] system_health_info(HomeAssistant hass)
None async_register(HomeAssistant hass, system_health.SystemHealthRegistration register)