-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""Provide info to system health.""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Any | ||
|
||
from homeassistant.components import system_health | ||
from homeassistant.core import HomeAssistant, callback | ||
|
||
from .const import DOMAIN | ||
|
||
|
||
@callback | ||
def async_register( | ||
hass: HomeAssistant, register: system_health.SystemHealthRegistration | ||
) -> None: | ||
"""Register system health callbacks.""" | ||
register.async_register_info(system_health_info) | ||
|
||
|
||
async def system_health_info(hass: HomeAssistant) -> dict[str, Any]: | ||
"""Get info for the info page.""" | ||
for k, v in hass.data[DOMAIN].items(): | ||
return { | ||
"Loxone Miniserver Serial": v.serial, | ||
"Project Name": v.project_name, | ||
"Local Url": v.local_url, | ||
"Loxone Software Version": v.software_version, | ||
} |