Updated isy994 component to hide any device with the HIDDEN STRING in its ancestry.
This commit is contained in:
1 parent
b20424261c
commit
6b2dd69bcb
4 files changed
+16
-6
No files matched your search
@@ -37,15 +37,18 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
if ISY.climate is not None:
|
||||
for prop in ISY.climate._id2name:
|
||||
if prop is not None:
|
||||
prefix = HIDDEN_STRING if prop in DEFAULT_HIDDEN_WEATHER else ''
|
||||
prefix = HIDDEN_STRING \
|
||||
if prop in DEFAULT_HIDDEN_WEATHER else ''
|
||||
node = WeatherPseudoNode('ISY.weather.' + prop, prefix + prop,
|
||||
getattr(ISY.climate, prop),
|
||||
getattr(ISY.climate, prop + '_units'))
|
||||
devs.append(ISYSensorDevice(node))
|
||||
|
||||
# import sensor nodes
|
||||
for node in ISY.nodes:
|
||||
for (path, node) in ISY.nodes:
|
||||
if SENSOR_STRING in node.name:
|
||||
if HIDDEN_STRING in path:
|
||||
node.name += HIDDEN_STRING
|
||||
devs.append(ISYSensorDevice(node, [STATE_ON, STATE_OFF]))
|
||||
|
||||
# import sensor programs
|
||||
|
||||
Reference in new issue
Block a user