From 794cfb79769d0645fa000547cca964a8be7d589f Mon Sep 17 00:00:00 2001 From: Greg Laabs Date: Wed, 20 Dec 2017 14:58:22 -0800 Subject: [PATCH] Fix detection of if a negative node is in use (#11255) * Fix detection of if a negative node is in use Fix a problem where every negative node gets detected as in-use. Code was not checking the correct property. * Allow protected access --- homeassistant/components/binary_sensor/isy994.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/binary_sensor/isy994.py b/homeassistant/components/binary_sensor/isy994.py index a5b61c9ffed..247ea0b231a 100644 --- a/homeassistant/components/binary_sensor/isy994.py +++ b/homeassistant/components/binary_sensor/isy994.py @@ -165,7 +165,8 @@ class ISYBinarySensorDevice(isy.ISYDevice, BinarySensorDevice): """ self._negative_node = child - if not _is_val_unknown(self._negative_node): + # pylint: disable=protected-access + if not _is_val_unknown(self._negative_node.status._val): # If the negative node has a value, it means the negative node is # in use for this device. Therefore, we cannot determine the state # of the sensor until we receive our first ON event.