Added rfxtrx rollershutter (#2030)

* Added rfxtrx rollershutter

* Updated mock command with real one

* Corrected test string
This commit is contained in:
Jacob Tomlinson authored and Paulus Schoutsen committed 2016-06-02 00:39:58 -07:00
1 parent 26d3c3b0d6
commit ca7415e935
7 files changed
+327 -4

No files matched your search

+14
View File
@@ -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))