mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Added rfxtrx rollershutter (#2030)
* Added rfxtrx rollershutter * Updated mock command with real one * Corrected test string
This commit is contained in:
committed by
Paulus Schoutsen
parent
26d3c3b0d6
commit
ca7415e935
@@ -219,6 +219,13 @@ class TestSwitchRfxtrx(unittest.TestCase):
|
||||
rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
|
||||
self.assertEqual(2, len(rfxtrx_core.RFX_DEVICES))
|
||||
|
||||
# Trying to add a rollershutter
|
||||
event = rfxtrx_core.get_rfx_object('0a1400adf394ab020e0060')
|
||||
event.data = bytearray([0x0A, 0x14, 0x00, 0xAD, 0xF3, 0x94,
|
||||
0xAB, 0x02, 0x0E, 0x00, 0x60])
|
||||
rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
|
||||
self.assertEqual(2, len(rfxtrx_core.RFX_DEVICES))
|
||||
|
||||
def test_discover_switch_noautoadd(self):
|
||||
"""Test with discovery of switch when auto add is False."""
|
||||
self.assertTrue(_setup_component(self.hass, 'switch', {
|
||||
@@ -255,3 +262,10 @@ class TestSwitchRfxtrx(unittest.TestCase):
|
||||
0x18, 0xcd, 0xea, 0x01, 0x02, 0x0f, 0x70])
|
||||
rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
|
||||
self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
|
||||
|
||||
# Trying to add a rollershutter
|
||||
event = rfxtrx_core.get_rfx_object('0a1400adf394ab020e0060')
|
||||
event.data = bytearray([0x0A, 0x14, 0x00, 0xAD, 0xF3, 0x94,
|
||||
0xAB, 0x02, 0x0E, 0x00, 0x60])
|
||||
rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
|
||||
self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
|
||||
|
||||
Reference in New Issue
Block a user