-
Notifications
You must be signed in to change notification settings - Fork 7
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
3 changed files
with
35 additions
and
5 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,24 @@ | ||
from typing import Any | ||
|
||
from homeassistant.config_entries import ConfigEntry | ||
from homeassistant.core import HomeAssistant | ||
|
||
from . import Component | ||
from .const import DOMAIN | ||
|
||
|
||
async def async_get_config_entry_diagnostics(hass: HomeAssistant, entry: ConfigEntry) -> dict[str, Any]: | ||
component: Component = hass.data[DOMAIN] | ||
entry_data = component.entry_datas[entry.entry_id] | ||
|
||
try: | ||
scenarios: Any = await entry_data.quasar.async_get_scenarios() | ||
except Exception as e: | ||
scenarios = e | ||
|
||
return { | ||
"yaml_config": component.yaml_config, | ||
"devices": entry_data.quasar.devices, | ||
"scenarios": scenarios, | ||
"intents": entry_data.intent_manager.intents, | ||
} |
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
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