예제 #1
0
    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()
예제 #2
0
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)
예제 #3
0
파일: example.py 프로젝트: maltejoos/wideq
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')
예제 #4
0
파일: example.py 프로젝트: maltejoos/wideq
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)