Skip to content

Commit

Permalink
system_health.py added...
Browse files Browse the repository at this point in the history
  • Loading branch information
JoDehli committed Aug 22, 2024
1 parent a587601 commit b491e13
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions custom_components/loxone/system_health.py
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,
}

0 comments on commit b491e13

Please sign in to comment.