Add mochad component (#3970)

This commit adds a new component for communicating with mochad[1] a
socket interface for the CM15A and CM19A USB X10 controllers. This
commit leverages the pymochad library to interface with a mochad socket
either on a local or remote machine. Mochad is added as as a generic
platform because it supports multiple different classes of device,
however in this patch only the switch device implemented as a starting
point. Future patches will include other devices types. (although
that's dependent on someone gaining access to those)

[1] https://sourceforge.net/projects/mochad/
This commit is contained in:
Matthew Treinish authored and Paulus Schoutsen committed 2016-10-24 21:49:49 -07:00
1 parent 23f54b07c7
commit 0ff500ca25
7 files changed
+272

No files matched your search

+12
View File
@@ -300,6 +300,18 @@ def test_temperature_unit():
schema('F')
def test_x10_address():
"""Test x10 addr validator."""
schema = vol.Schema(cv.x10_address)
with pytest.raises(vol.Invalid):
schema('Q1')
schema('q55')
schema('garbage_addr')
schema('a1')
schema('C11')
def test_template():
"""Test template validator."""
schema = vol.Schema(cv.template)