libpurecool/dyson.py
def devices(self):
        """Return all devices linked to the account."""
        if self._logged:
            devices = []
            if self.getDevices(1) and self.getDevices(2):
                for device in self._cache['devicesv1']:
                    if is_360_eye_device(device):
                        dyson_device = Dyson360Eye(device)
                    elif is_heating_device(device):
                        dyson_device = DysonPureHotCoolLink(device)
                    else:
                        dyson_device = DysonPureCoolLink(device)
                    devices.append(dyson_device)

                for device_v2 in self._cache['devicesv2']:
                    if is_dyson_pure_humidifycool_device(device_v2):
                        devices.append(DysonPureHumidifyCool(device_v2))
                    elif is_dyson_pure_cool_device(device_v2):
                        devices.append(DysonPureCool(device_v2))
                    elif is_heating_device_v2(device_v2):
                        devices.append(DysonPureHotCool(device_v2))
            return devices

        _LOGGER.warning("Not logged to Dyson Web Services.")
        raise DysonNotLoggedException()
Return all devices linked to the account.
Return all devices linked to the account.
Return all devices linked to the account .
def devices(self):
        if self._logged:
            devices = []
            if self.getDevices(1) and self.getDevices(2):
                for device in self._cache['devicesv1']:
                    if is_360_eye_device(device):
                        dyson_device = Dyson360Eye(device)
                    elif is_heating_device(device):
                        dyson_device = DysonPureHotCoolLink(device)
                    else:
                        dyson_device = DysonPureCoolLink(device)
                    devices.append(dyson_device)
                for device_v2 in self._cache['devicesv2']:
                    if is_dyson_pure_humidifycool_device(device_v2):
                        devices.append(DysonPureHumidifyCool(device_v2))
                    elif is_dyson_pure_cool_device(device_v2):
                        devices.append(DysonPureCool(device_v2))
                    elif is_heating_device_v2(device_v2):
                        devices.append(DysonPureHotCool(device_v2))
            return devices
        _LOGGER.warning("Not logged to Dyson Web Services.")
        raise DysonNotLoggedException()
def devices ( self ) : if self . _logged : devices = [ ] if self . getDevices ( 1 ) and self . getDevices ( 2 ) : for device in self . _cache [ 'devicesv1' ] : if is_360_eye_device ( device ) : dyson_device = Dyson360Eye ( device ) elif is_heating_device ( device ) : dyson_device = DysonPureHotCoolLink ( device ) else : dyson_device = DysonPureCoolLink ( device ) devices . append ( dyson_device ) for device_v2 in self . _cache [ 'devicesv2' ] : if is_dyson_pure_humidifycool_device ( device_v2 ) : devices . append ( DysonPureHumidifyCool ( device_v2 ) ) elif is_dyson_pure_cool_device ( device_v2 ) : devices . append ( DysonPureCool ( device_v2 ) ) elif is_heating_device_v2 ( device_v2 ) : devices . append ( DysonPureHotCool ( device_v2 ) ) return devices _LOGGER . warning ( "Not logged to Dyson Web Services." ) raise DysonNotLoggedException ( )
Return all devices linked to the account.
Return all devices linked to the account .
"""Return all devices linked to the account."""
self