예제 #1
0
def wp_config(client, device_id):
    wp = wideq.WPDevice(client, client.get_device(device_id))
    print('day')
    print(wp.day_water_usage('C'))
    print('week')
    print(wp.week_water_usage('C'))
    print('month')
    print(wp.month_water_usage('N'))
    print('year')
    print(wp.year_water_usage('C'))
    print(wp.year_water_usage('N'))
    print(wp.year_water_usage('H'))
예제 #2
0
    def __init__(self, client, device, name, model_type):
        """initialize a LGE WATER PURIFIER Device."""
        LGEDevice.__init__(self, client, device)

        import wideq
        self._wp = wideq.WPDevice(client, device)

        self._wp.monitor_start()
        self._wp.monitor_start()
        self._wp.delete_permission()
        self._wp.delete_permission()

        # The response from the monitoring query.
        self._state = None
        self._name = name
        self._type = model_type

        self.update()