provide unified access to state icon (or colored led)
This commit is contained in:
parent
7c1dbdc732
commit
cc6e1a5f3e
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ class State(object):
|
||||||
for k, v in kw.items():
|
for k, v in kw.items():
|
||||||
setattr(self, k, v)
|
setattr(self, k, v)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def stateIcon(self):
|
||||||
|
return 'cybertools.icons/' + (self.icon or 'led%s.png' % self.color)
|
||||||
|
|
||||||
|
|
||||||
class Action(object):
|
class Action(object):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue