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
@@ -3,7 +3,8 @@
|
||||
import logging
|
||||
|
||||
# homeassistant imports
|
||||
from homeassistant.components.isy994 import ISYDeviceABC, ISY, SENSOR_STRING
|
||||
from homeassistant.components.isy994 import (ISYDeviceABC, ISY, SENSOR_STRING,
|
||||
HIDDEN_STRING)
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS
|
||||
from homeassistant.const import STATE_ON, STATE_OFF
|
||||
|
||||
@@ -18,8 +19,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
return False
|
||||
|
||||
# import dimmable nodes
|
||||
for node in ISY.nodes:
|
||||
for (path, node) in ISY.nodes:
|
||||
if node.dimmable and SENSOR_STRING not in node.name:
|
||||
if HIDDEN_STRING in path:
|
||||
node.name += HIDDEN_STRING
|
||||
devs.append(ISYLightDevice(node))
|
||||
|
||||
add_devices(devs)
|
||||
|
||||
Reference in new issue
Block a user