コード例 #1
0
 def set_fanmode(self, **kwargs):
     mode = kwargs["mode"]
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="fanmode",
         value=mode)
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #2
0
 def set_filterlifespandays(self, **kwargs):
     days = kwargs["days"]
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="filterlifespandays",
         value=days)
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #3
0
 def switch_off(self, **kwargs):
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="state",
         value="OFF",
     )
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #4
0
 def unlock_door(self, **kwargs):
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="lockstate",
         value="UNLOCKED",
     )
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #5
0
 def set_haloalertstate(self, **kwargs):
     setpoint = kwargs["state"]
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="haloalertstate",
         value=state,
     )
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #6
0
 def set_room(self, **kwargs):
     setpoint = kwargs["room"]
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="room",
         value=room,
     )
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #7
0
 def set_heatsetpoint(self, **kwargs):
     setpoint = kwargs["setpoint"]
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="heatsetpoint",
         value=utils.farenheit_to_celsius(setpoint),
     )
     request.send(client=self, payload=payload, debug=self.iris.debug)
コード例 #8
0
 def set_brightness(self, **kwargs):
     level = kwargs["level"]
     payload = payloads.set_attributes(
         place_id=self.iris.place_id,
         device_id=self.iris.devices[kwargs["device"]]["base:id"],
         namespace=self.namespace,
         key="brightness",
         value=level,
     )
     request.send(client=self, payload=payload, debug=self.iris.debug)