Add diagnostics to Overkiz integration (#64427)

pull/64493/head
Mick Vleeshouwer 2022-01-19 15:51:52 -08:00 committed by GitHub
parent c00cff2650
commit 2503530b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 3 deletions

View File

@ -818,6 +818,7 @@ omit =
homeassistant/components/overkiz/binary_sensor.py
homeassistant/components/overkiz/button.py
homeassistant/components/overkiz/coordinator.py
homeassistant/components/overkiz/diagnostics.py
homeassistant/components/overkiz/entity.py
homeassistant/components/overkiz/executor.py
homeassistant/components/overkiz/light.py

View File

@ -0,0 +1,21 @@
"""Provides diagnostics for Overkiz."""
from __future__ import annotations
from typing import Any, cast
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from . import HomeAssistantOverkizData
from .const import DOMAIN
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, entry: ConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
data: HomeAssistantOverkizData = hass.data[DOMAIN][entry.entry_id]
client = data.coordinator.client
setup = await client.get_diagnostic_data()
return cast(dict, setup)

View File

@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/overkiz",
"requirements": [
"pyoverkiz==1.1.1"
"pyoverkiz==1.2.0"
],
"dhcp": [
{

View File

@ -1740,7 +1740,7 @@ pyotgw==1.1b1
pyotp==2.6.0
# homeassistant.components.overkiz
pyoverkiz==1.1.1
pyoverkiz==1.2.0
# homeassistant.components.openweathermap
pyowm==3.2.0

View File

@ -1100,7 +1100,7 @@ pyotgw==1.1b1
pyotp==2.6.0
# homeassistant.components.overkiz
pyoverkiz==1.1.1
pyoverkiz==1.2.0
# homeassistant.components.openweathermap
pyowm==3.2.0