Skip to content
Snippets Groups Projects
Commit 740f5ae1 authored by jkerdreu's avatar jkerdreu
Browse files

Change to the new schema.


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2462 b32b6428-25c9-4566-ad07-03861ab6144f
parent 641cd64f
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,8 @@ class OnOffMixin:
def setup_onoff(self,state_attribute):
cmd = self.cfg.get('cmd',None)
if cmd:
self.dev.add_method('on', self.write(cmd,'1',1))
self.dev.add_method('off',self.write(cmd,'1',0))
self.dev.add_method('turn_on', self.write(cmd,'1',1))
self.dev.add_method('turn_off',self.write(cmd,'1',0))
state = self.cfg.get('state',None) or cmd
mod = self.cfg.get('mod','bool')
if state:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment