Adjust device_automation type hints in deconz (#72194)
This commit is contained in:
parent
487819bbe5
commit
a57697d6e9
1 changed files with 7 additions and 8 deletions
|
@ -1,16 +1,16 @@
|
||||||
"""Provides device automations for deconz events."""
|
"""Provides device automations for deconz events."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.automation import (
|
from homeassistant.components.automation import (
|
||||||
AutomationActionType,
|
AutomationActionType,
|
||||||
AutomationTriggerInfo,
|
AutomationTriggerInfo,
|
||||||
)
|
)
|
||||||
from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA
|
from homeassistant.components.device_automation import (
|
||||||
|
DEVICE_TRIGGER_BASE_SCHEMA,
|
||||||
|
GetAutomationsResult,
|
||||||
|
)
|
||||||
from homeassistant.components.device_automation.exceptions import (
|
from homeassistant.components.device_automation.exceptions import (
|
||||||
InvalidDeviceAutomationConfig,
|
InvalidDeviceAutomationConfig,
|
||||||
)
|
)
|
||||||
|
@ -642,9 +642,8 @@ def _get_deconz_event_from_device(
|
||||||
|
|
||||||
|
|
||||||
async def async_validate_trigger_config(
|
async def async_validate_trigger_config(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, config: ConfigType
|
||||||
config: dict[str, Any],
|
) -> ConfigType:
|
||||||
) -> vol.Schema:
|
|
||||||
"""Validate config."""
|
"""Validate config."""
|
||||||
config = TRIGGER_SCHEMA(config)
|
config = TRIGGER_SCHEMA(config)
|
||||||
|
|
||||||
|
@ -703,7 +702,7 @@ async def async_attach_trigger(
|
||||||
async def async_get_triggers(
|
async def async_get_triggers(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
device_id: str,
|
device_id: str,
|
||||||
) -> list[dict[str, str]]:
|
) -> GetAutomationsResult:
|
||||||
"""List device triggers.
|
"""List device triggers.
|
||||||
|
|
||||||
Make sure device is a supported remote model.
|
Make sure device is a supported remote model.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue