Added hidden_string and sensor_string properties to the isy994 configuration to allow nodes to be hidden and to be handled as sensors. Implimented the sensor_string. Any node name that contains the sensor_string in its name will be treated as a sensor instead of a switch or light. The hidden_string will be implimented later.
This commit is contained in:
1 parent
0e9a8a7cc2
commit
83aea10f06
4 files changed
+35
-22
No files matched your search
@@ -3,7 +3,7 @@
|
||||
import logging
|
||||
|
||||
# homeassistant imports
|
||||
from homeassistant.components.isy994 import ISYDeviceABC, ISY
|
||||
from homeassistant.components.isy994 import ISYDeviceABC, ISY, SENSOR_STRING
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS
|
||||
from homeassistant.const import STATE_ON, STATE_OFF
|
||||
|
||||
@@ -19,7 +19,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
# import dimmable nodes
|
||||
for node in ISY.nodes:
|
||||
if node.dimmable:
|
||||
if node.dimmable and SENSOR_STRING not in node.name:
|
||||
devs.append(ISYLightDevice(node))
|
||||
|
||||
add_devices(devs)
|
||||
|
||||
Reference in new issue
Block a user