Home Assistant Unofficial Reference
2024.12.1
repairs.py
Go to the documentation of this file.
1
"""Repairs implementation for the VoIP integration."""
2
3
from
__future__
import
annotations
4
5
from
homeassistant.components.assist_pipeline.repair_flows
import
(
6
AssistInProgressDeprecatedRepairFlow,
7
)
8
from
homeassistant.components.repairs
import
RepairsFlow
9
from
homeassistant.core
import
HomeAssistant
10
11
12
async
def
async_create_fix_flow
(
13
hass: HomeAssistant,
14
issue_id: str,
15
data: dict[str, str | int | float |
None
] |
None
,
16
) -> RepairsFlow:
17
"""Create flow."""
18
if
issue_id.startswith(
"assist_in_progress_deprecated"
):
19
return
AssistInProgressDeprecatedRepairFlow
(data)
20
# If VoIP adds confirm-only repairs in the future, this should be changed
21
# to return a ConfirmRepairFlow instead of raising a ValueError
22
raise
ValueError(f
"unknown repair {issue_id}"
)
homeassistant.components.assist_pipeline.repair_flows.AssistInProgressDeprecatedRepairFlow
Definition:
repair_flows.py:17
homeassistant.components.assist_pipeline.repair_flows
Definition:
repair_flows.py:1
homeassistant.components.repairs
Definition:
__init__.py:1
homeassistant.components.voip.repairs.async_create_fix_flow
RepairsFlow async_create_fix_flow(HomeAssistant hass, str issue_id, dict[str, str|int|float|None]|None data)
Definition:
repairs.py:16
homeassistant.core
Definition:
core.py:1
core
homeassistant
components
voip
repairs.py
Generated by
1.9.1