Ejemplo n.º 1
0
 def set_prog_runatstart(self, en):
     rval = val2bool(en)
     #print "set_prog_enable ", rval
     if rval:
        self.isy.prog_comm(self._mydict['id'], "runAtStartup")
     else:
        self.isy.prog_comm(self._mydict['id'], "disableRunAtStartup")
     self._mydict["runAtStartup"] = rval
     return rval
Ejemplo n.º 2
0
    def set_prog_enable(self, en):
	rval = val2bool(en)
	#print "set_prog_enable ", rval
        if rval :
	   self.isy.prog_comm(self._mydict['id'], "enable")
        else :
	   self.isy.prog_comm(self._mydict['id'], "disable")
	self._mydict["enabled"] = rval
        return rval
Ejemplo n.º 3
0
    def set_prog_runatstart(self, en):
	rval = val2bool(en)
	#print "set_prog_enable ", rval
        if rval :
	   self.isy.prog_comm(self._mydict['id'], "runAtStartup")
        else :
	   self.isy.prog_comm(self._mydict['id'], "disableRunAtStartup")
	self._mydict["runAtStartup"] = rval
        return rval
Ejemplo n.º 4
0
 def set_prog_enable(self, en):
     rval = val2bool(en)
     #print "set_prog_enable ", rval
     if "enabled" in self._mydict:
         if rval:
            self.isy.prog_comm(self._mydict['id'], "enable")
         else:
            self.isy.prog_comm(self._mydict['id'], "disable")
     self._mydict["enabled"] = rval
     return rval
Ejemplo n.º 5
0
    def _get_prop(self, prop):

        # print "IN get_prop ", prop

        if prop == "formatted" :
            prop = "ST"
            value = "formatted"
        else :
            value = "value"

        if prop in self._propalias :
            prop = self._propalias[prop]

        if not prop in self._getlist :
            raise IsyPropertyError("no property Attribute {!s}".format(prop))

        # check if we have a property

        if prop in ['ST', 'OL', 'RR'] :
            # Scene's do not have property values

            if prop in self._mydict["property"] :
                # print self._mydict["property"]
                # print "prop value", prop, value
                return self._mydict["property"][prop][value]
            else :
                return None

#            if self._mydict["property"]["time"] == 0 :
#                    self.update()
#            elif self.isy.cachetime :
#                if time.gmtime() < (self.cachetime + self._mydict["property"]["time"] ) :
#                    self.update()

        else :

            if prop in self._mydict :
		if prop in self._boollist :
		    return(val2bool(self._mydict[prop])) 
		else :
		    return self._mydict[prop]
            else :
                return None