Zwave: Apply refresh_node workaround on 1st instance only (#7579)

* Apply refresh_node workaround on 1st instance only

* Add another test
This commit is contained in:
Andrey authored and GitHub committed 2017-05-21 17:33:42 +03:00
1 parent 24b7fd3694
commit 927024714b
3 files changed
+25 -4

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ from unittest.mock import patch
from homeassistant.components.switch import zwave
from tests.mock.zwave import (
MockNode, MockValue, MockEntityValues, value_changed)
MockNode, MockValue, MockEntityValues, value_changed)
def test_get_device_detects_switch(mock_openzwave):
@@ -61,7 +61,7 @@ def test_switch_refresh_on_update(mock_counter, mock_openzwave):
mock_counter.return_value = 10
node = MockNode(manufacturer_id='013c', product_type='0001',
product_id='0005')
value = MockValue(data=False, node=node)
value = MockValue(data=False, node=node, instance=1)
values = MockEntityValues(primary=value)
device = zwave.get_device(node=node, values=values, node_config={})