Don't try to re-add existing Z-Wave entities (#17995)

* Keep track of created entities

* lint

* Update tests
This commit is contained in:
Charles Garwood authored and Paulus Schoutsen committed 2018-11-01 19:38:23 +01:00
1 parent 23290fa6ee
commit bcea3a9cba
2 files changed
+19 -13

No files matched your search

+2 -2
View File
@@ -584,7 +584,7 @@ class TestZWaveDeviceEntityValues(unittest.TestCase):
assert args[0] == self.hass
assert args[1] == 'mock_component'
assert args[2] == 'zwave'
assert args[3] == {const.DISCOVERY_DEVICE: id(values)}
assert args[3] == {const.DISCOVERY_DEVICE: mock_device.unique_id}
assert args[4] == self.zwave_config
discovery.async_load_platform.reset_mock()
@@ -646,7 +646,7 @@ class TestZWaveDeviceEntityValues(unittest.TestCase):
assert args[0] == self.hass
assert args[1] == 'mock_component'
assert args[2] == 'zwave'
assert args[3] == {const.DISCOVERY_DEVICE: id(values)}
assert args[3] == {const.DISCOVERY_DEVICE: mock_device.unique_id}
assert args[4] == self.zwave_config
assert not self.primary.enable_poll.called