'Update the device from a new JSON object.'

def update(self):

    self._data.update()
    array = self._data.data[OHM_CHILDREN]
    _attributes = {}
    for path_index in range(0, len(self.path)):
        path_number = self.path[path_index]
        values = array[path_number]
        if (path_index == (len(self.path) - 1)):
            self.value = values[OHM_VALUE].split('    ')[0]
            _attributes.update({'name': values[OHM_NAME], STATE_MIN_VALUE: values[OHM_MIN].split('    ')[0], STATE_MAX_VALUE: values[OHM_MAX].split('    ')[0]})
            self.attributes = _attributes
            return
        else:
            array = array[path_number][OHM_CHILDREN]
            _attributes.update({('level_%s' % path_index): values[OHM_NAME]})
