mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Adjust device_automation type hints in netatmo (#72136)
* Adjust device_automation type hints in netatmo * Improve type hints
This commit is contained in:
parent
85ef0e3bd6
commit
4fb3a01c36
@ -1,15 +1,16 @@
|
|||||||
"""Provides device automations for Netatmo."""
|
"""Provides device automations for Netatmo."""
|
||||||
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,
|
||||||
)
|
)
|
||||||
@ -100,7 +101,7 @@ async def async_validate_trigger_config(
|
|||||||
|
|
||||||
async def async_get_triggers(
|
async def async_get_triggers(
|
||||||
hass: HomeAssistant, device_id: str
|
hass: HomeAssistant, device_id: str
|
||||||
) -> list[dict[str, Any]]:
|
) -> GetAutomationsResult:
|
||||||
"""List device triggers for Netatmo devices."""
|
"""List device triggers for Netatmo devices."""
|
||||||
registry = entity_registry.async_get(hass)
|
registry = entity_registry.async_get(hass)
|
||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user