Avoid using implementation internal to trigger events (#38041)
This uses the moxking in fixture to trigger events.
This commit is contained in:
1 parent
945acb4e29
commit
7a3c6d6525
8 files changed
+41
-50
No files matched your search
@@ -7,8 +7,6 @@ from homeassistant.components.light import ATTR_BRIGHTNESS
|
||||
from homeassistant.core import State
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from . import _signal_event
|
||||
|
||||
from tests.common import mock_restore_cache
|
||||
|
||||
|
||||
@@ -175,13 +173,13 @@ async def test_discover_light(hass, rfxtrx):
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_start()
|
||||
|
||||
await _signal_event(hass, "0b11009e00e6116202020070")
|
||||
await rfxtrx.signal("0b11009e00e6116202020070")
|
||||
state = hass.states.get("light.ac_0e61162_2")
|
||||
assert state
|
||||
assert state.state == "on"
|
||||
assert state.attributes.get("friendly_name") == "AC 0e61162:2"
|
||||
|
||||
await _signal_event(hass, "0b1100120118cdea02020070")
|
||||
await rfxtrx.signal("0b1100120118cdea02020070")
|
||||
state = hass.states.get("light.ac_118cdea_2")
|
||||
assert state
|
||||
assert state.state == "on"
|
||||
|
||||
Reference in new issue
Block a user