Device Automation: enforce passing in device-automation-enum (#69013)

This commit is contained in:
Paulus Schoutsen 2022-03-31 14:30:11 -07:00 committed by GitHub
parent 69ee4cd978
commit 824066f519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 42 deletions

View file

@ -404,13 +404,6 @@ async def test_async_get_device_automations_single_device_trigger(
assert device_entry.id in result
assert len(result[device_entry.id]) == 3
# Test deprecated str automation_type works, to be removed in 2022.4
result = await device_automation.async_get_device_automations(
hass, "trigger", [device_entry.id]
)
assert device_entry.id in result
assert len(result[device_entry.id]) == 3 # toggled, turned_on, turned_off
async def test_async_get_device_automations_all_devices_trigger(
hass, device_reg, entity_reg