mirror of
https://github.com/home-assistant/core.git
synced 2025-12-26 22:18:40 +00:00
Remaining DeviceAutomationType bits (#62508)
* Use DeviceAutomationType in missed tests/components/* * Tighten device automation type hints
This commit is contained in:
@@ -158,7 +158,7 @@ async def test_get_trigger_capabilities(
|
||||
assert len(triggers) == 4
|
||||
for trigger in triggers:
|
||||
capabilities = await async_get_device_automation_capabilities(
|
||||
hass, "trigger", trigger
|
||||
hass, DeviceAutomationType.TRIGGER, trigger
|
||||
)
|
||||
assert capabilities == {
|
||||
"extra_fields": [
|
||||
@@ -213,7 +213,7 @@ async def test_get_trigger_capabilities_set_pos(
|
||||
assert len(triggers) == 5
|
||||
for trigger in triggers:
|
||||
capabilities = await async_get_device_automation_capabilities(
|
||||
hass, "trigger", trigger
|
||||
hass, DeviceAutomationType.TRIGGER, trigger
|
||||
)
|
||||
if trigger["type"] == "position":
|
||||
assert capabilities == expected_capabilities
|
||||
@@ -275,7 +275,7 @@ async def test_get_trigger_capabilities_set_tilt_pos(
|
||||
assert len(triggers) == 5
|
||||
for trigger in triggers:
|
||||
capabilities = await async_get_device_automation_capabilities(
|
||||
hass, "trigger", trigger
|
||||
hass, DeviceAutomationType.TRIGGER, trigger
|
||||
)
|
||||
if trigger["type"] == "tilt_position":
|
||||
assert capabilities == expected_capabilities
|
||||
|
||||
Reference in New Issue
Block a user