Adjust device_automation type hints in netatmo (#72136)

* Adjust device_automation type hints in netatmo

* Improve type hints
This commit is contained in:
epenet
2022-05-20 08:27:49 +02:00
committed by GitHub
parent 85ef0e3bd6
commit 4fb3a01c36

View File

@@ -1,15 +1,16 @@
"""Provides device automations for Netatmo."""
from __future__ import annotations
from typing import Any
import voluptuous as vol
from homeassistant.components.automation import (
AutomationActionType,
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 (
InvalidDeviceAutomationConfig,
)
@@ -100,7 +101,7 @@ async def async_validate_trigger_config(
async def async_get_triggers(
hass: HomeAssistant, device_id: str
) -> list[dict[str, Any]]:
) -> GetAutomationsResult:
"""List device triggers for Netatmo devices."""
registry = entity_registry.async_get(hass)
device_registry = dr.async_get(hass)