Use DeviceAutomationType in tests/components/[m-r]* (#62443)

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

View file

@ -2,6 +2,7 @@
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.device_automation import DeviceAutomationType
from homeassistant.components.remote import DOMAIN
from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON
from homeassistant.helpers import device_registry
@ -64,7 +65,9 @@ async def test_get_actions(hass, device_reg, entity_reg):
"entity_id": f"{DOMAIN}.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 actions == expected_actions