def parseString(self, vect): #TODO if name more than one word for i in range(len(vect)): if vect[i] == "name": #TODO blacklist of names self.name = vect[i + 1] elif vect[i] == "save": self.storelightstate = True elif vect[i] == "brighter": self.brighter() return elif vect[i] == "dimmer": self.dimmer() return output = hput("scenes/{0}".format(self.bid), self.asdict()) print(output)
def _set_states(self, states): hput('lights/{0}/state'.format(self.bid), states)
def _set_states(self,states): hput('groups/{0}/action'.format(self.bid),states)
def modifyScene(self, lid, state): url = "scenes/{0}/lightstates/{1}".format(self.bid, lid) return hput(url, state)
def store(self): output = hput("scenes/{0}".format(self.bid), {"storelightstate": True}) print(output)