Use DeviceAutomationType in tests/components/[a-f]* (#62440)

This commit is contained in:
Ville Skyttä 2021-12-20 23:26:29 +02:00 committed by GitHub
parent c5e6489475
commit 5926961ed5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 140 additions and 40 deletions

View file

@ -3,6 +3,7 @@ import pytest
from homeassistant.components import automation
from homeassistant.components.button import DOMAIN
from homeassistant.components.device_automation import DeviceAutomationType
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry, entity_registry
from homeassistant.setup import async_setup_component
@ -50,7 +51,9 @@ async def test_get_actions(
"entity_id": "button.test_5678",
}
]
actions = await async_get_device_automations(hass, "action", device_entry.id)
actions = await async_get_device_automations(
hass, DeviceAutomationType.ACTION, device_entry.id
)
assert_lists_same(actions, expected_actions)