Adjust device_automation type hints in lcn (#72132)
This commit is contained in:
parent
dfc8dee2d6
commit
df3e3b52a0
1 changed files with 4 additions and 4 deletions
|
@ -1,8 +1,6 @@
|
||||||
"""Provides device triggers for LCN."""
|
"""Provides device triggers for LCN."""
|
||||||
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 (
|
||||||
|
@ -53,7 +51,7 @@ TYPE_SCHEMAS = {
|
||||||
|
|
||||||
async def async_get_triggers(
|
async def async_get_triggers(
|
||||||
hass: HomeAssistant, device_id: str
|
hass: HomeAssistant, device_id: str
|
||||||
) -> list[dict[str, Any]]:
|
) -> list[dict[str, str]]:
|
||||||
"""List device triggers for LCN devices."""
|
"""List device triggers for LCN devices."""
|
||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
if (device := device_registry.async_get(device_id)) is None:
|
if (device := device_registry.async_get(device_id)) is None:
|
||||||
|
@ -101,6 +99,8 @@ async def async_attach_trigger(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def async_get_trigger_capabilities(hass: HomeAssistant, config: dict) -> dict:
|
async def async_get_trigger_capabilities(
|
||||||
|
hass: HomeAssistant, config: ConfigType
|
||||||
|
) -> dict[str, vol.Schema]:
|
||||||
"""List trigger capabilities."""
|
"""List trigger capabilities."""
|
||||||
return TYPE_SCHEMAS.get(config[CONF_TYPE], {})
|
return TYPE_SCHEMAS.get(config[CONF_TYPE], {})
|
||||||
|
|
Loading…
Add table
Reference in a new issue