Cleaned up some entities.
1) Modified device tracker entities to allow for attributes to be overwritten with configuration data. 2) Modified ISY lights to hide brightness when off.
This commit is contained in:
1 parent
4f8b843a1e
commit
936e20bdf7
3 files changed
+17
-2
No files matched your search
@@ -38,3 +38,9 @@ class ISYLightDevice(ISYDeviceABC):
|
||||
_attrs = {ATTR_BRIGHTNESS: 'value'}
|
||||
_onattrs = [ATTR_BRIGHTNESS]
|
||||
_states = [STATE_ON, STATE_OFF]
|
||||
|
||||
def _attr_filter(self, attr):
|
||||
""" Filter brightness out of entity while off. """
|
||||
if ATTR_BRIGHTNESS in attr and not self.is_on:
|
||||
del attr[ATTR_BRIGHTNESS]
|
||||
return attr
|
||||
Reference in new issue
Block a user