1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Support for GE Zwave fan controller (#7767)

* Support for GE Zwave fan controller

* Tests for zwave fan

* Add additional fan workarounds
This commit is contained in:
Adam Mills
2017-05-26 01:55:00 -04:00
committed by Paulus Schoutsen
parent 6899c7b6f7
commit 9e9705d6b2
5 changed files with 260 additions and 4 deletions

View File

@@ -18,6 +18,23 @@ def test_get_device_component_mapping():
assert workaround.get_device_component_mapping(value) == 'binary_sensor'
def test_get_device_component_mapping_mti():
"""Test that component is returned."""
# GE Fan controller
node = MockNode(manufacturer_id='0063', product_type='4944',
product_id='3034')
value = MockValue(data=0, node=node,
command_class=const.COMMAND_CLASS_SWITCH_MULTILEVEL)
assert workaround.get_device_component_mapping(value) == 'fan'
# GE Dimmer
node = MockNode(manufacturer_id='0063', product_type='4944',
product_id='3031')
value = MockValue(data=0, node=node,
command_class=const.COMMAND_CLASS_SWITCH_MULTILEVEL)
assert workaround.get_device_component_mapping(value) is None
def test_get_device_no_mapping():
"""Test that no device mapping is returned."""
node = MockNode(manufacturer_id=' ')