mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add diagnostics support to Stookalert (#64747)
* Add diagnostics support to Stookalert * coveragerc
This commit is contained in:
parent
d8b6291806
commit
88c9422b70
@ -1069,6 +1069,7 @@ omit =
|
|||||||
homeassistant/components/stiebel_eltron/*
|
homeassistant/components/stiebel_eltron/*
|
||||||
homeassistant/components/stookalert/__init__.py
|
homeassistant/components/stookalert/__init__.py
|
||||||
homeassistant/components/stookalert/binary_sensor.py
|
homeassistant/components/stookalert/binary_sensor.py
|
||||||
|
homeassistant/components/stookalert/diagnostics.py
|
||||||
homeassistant/components/stream/*
|
homeassistant/components/stream/*
|
||||||
homeassistant/components/streamlabswater/*
|
homeassistant/components/streamlabswater/*
|
||||||
homeassistant/components/suez_water/*
|
homeassistant/components/suez_water/*
|
||||||
|
19
homeassistant/components/stookalert/diagnostics.py
Normal file
19
homeassistant/components/stookalert/diagnostics.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
"""Diagnostics support for Stookalert."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
import stookalert
|
||||||
|
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
async def async_get_config_entry_diagnostics(
|
||||||
|
hass: HomeAssistant, entry: ConfigEntry
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""Return diagnostics for a config entry."""
|
||||||
|
client: stookalert.stookalert = hass.data[DOMAIN][entry.entry_id]
|
||||||
|
return {"state": client.state}
|
Loading…
x
Reference in New Issue
Block a user