def __init__(self, client, device): """initialize a LGE Refrigerator Device.""" LGEDevice.__init__(self, client, device) import wideq self._ref = wideq.RefDevice(client, device) self._ref.monitor_start() self._ref.monitor_start() self._ref.delete_permission() self._ref.delete_permission() # The response from the monitoring query. self._state = None # Store a transient temperature when we've just set it. We also # store the timestamp for when we set this value. self._transient_temp = None self._transient_time = None self.update()
def set_reftemp(client, device_id, temp): """Set the configured temperature for an AC device.""" ref = wideq.RefDevice(client, client.get_device(device_id)) ref.set_reftemp(temp)
def set_iceplus(client, device_id, on_off): """Set the eco mode for a refrigerator device.""" ref = wideq.RefDevice(client, client.get_device(device_id)) ref.set_iceplus(on_off == 'on')
def set_freezertemp(client, device_id, temp): """Set the configured temperature for a refrigerator device.""" ref = wideq.RefDevice(client, client.get_device(device_id)) ref.set_freezertemp(temp)