mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Adjust device_automation type hints in deconz (#72129)
This commit is contained in:
parent
c4f6fcc3d2
commit
be809980a1
@ -703,7 +703,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 | None:
|
) -> list[dict[str, str]]:
|
||||||
"""List device triggers.
|
"""List device triggers.
|
||||||
|
|
||||||
Make sure device is a supported remote model.
|
Make sure device is a supported remote model.
|
||||||
@ -714,7 +714,7 @@ async def async_get_triggers(
|
|||||||
device = device_registry.devices[device_id]
|
device = device_registry.devices[device_id]
|
||||||
|
|
||||||
if device.model not in REMOTES:
|
if device.model not in REMOTES:
|
||||||
return None
|
return []
|
||||||
|
|
||||||
triggers = []
|
triggers = []
|
||||||
for trigger, subtype in REMOTES[device.model].keys():
|
for trigger, subtype in REMOTES[device.model].keys():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user