code: def _get_states(self, result):
          
          if 'devices' not in result.keys():
              return
  
          for device_states in result['devices']:
              device = self.__devices[device_states['deviceURL']]
              try:
                  device.set_active_states(device_states['states'])
              except KeyError:
                  pass
docs: Get states of devices.