1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

deCONZ - Improve tests based on Martins feedback in Axis integration (#30438)

This commit is contained in:
Robert Svensson
2020-01-03 18:11:04 +01:00
committed by GitHub
parent 8a1fc8b8f0
commit ec61342ec3
12 changed files with 84 additions and 197 deletions

View File

@@ -3,7 +3,7 @@ from copy import deepcopy
from homeassistant.components.deconz import device_trigger
from .test_gateway import DECONZ_WEB_REQUEST, ENTRY_CONFIG, setup_deconz_integration
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration
from tests.common import assert_lists_same, async_get_device_automations
@@ -34,9 +34,7 @@ async def test_get_triggers(hass):
"""Test triggers work."""
data = deepcopy(DECONZ_WEB_REQUEST)
data["sensors"] = deepcopy(SENSORS)
gateway = await setup_deconz_integration(
hass, ENTRY_CONFIG, options={}, get_state_response=data
)
gateway = await setup_deconz_integration(hass, get_state_response=data)
device_id = gateway.events[0].device_id
triggers = await async_get_device_automations(hass, "trigger", device_id)