How to use the somecomfort.client.Device.from_location_response function in somecomfort

To help you get started, we’ve selected a few somecomfort examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kk7ds / somecomfort / somecomfort / client.py View on Github external
def from_api_response(cls, client, api_response):
        self = cls(client)
        self._locationid = api_response['LocationID']
        devices = api_response['Devices']
        _devices = [Device.from_location_response(client, self, dev)
                    for dev in devices]
        self._devices = {dev.deviceid: dev for dev in _devices}
        return self