Rewrite rfxtrx init logic to do away with global object (#37699)
* Rewrite init logic to do away with global object * Put constant at end * Use a set instead of list for device_ids
This commit is contained in:
1 parent
b45a952d61
commit
67038c6ba8
11 files changed
+365
-334
No files matched your search
@@ -141,7 +141,7 @@ async def test_fire_event(hass):
|
||||
assert state
|
||||
assert state.state == "on"
|
||||
|
||||
assert 1 == len(calls)
|
||||
assert len(calls) == 1
|
||||
assert calls[0].data == {"entity_id": "switch.test", "state": "on"}
|
||||
|
||||
|
||||
@@ -187,5 +187,5 @@ async def test_fire_event_sensor(hass):
|
||||
hass.bus.async_listen("signal_received", record_event)
|
||||
|
||||
await _signal_event(hass, "0a520802060101ff0f0269")
|
||||
assert 1 == len(calls)
|
||||
assert calls[0].data == {"entity_id": "sensor.test_temperature"}
|
||||
assert len(calls) == 5
|
||||
assert any(call.data == {"entity_id": "sensor.test_temperature"} for call in calls)
|
||||
Reference in new issue
Block a user