'Return the state attributes of the sensor.'

@property
def device_state_attributes(self):

    attributes = {}
    if (self.type == 'upcoming'):
        for movie in self.data:
            attributes[to_key(movie)] = get_release_date(movie)
    elif (self.type == 'commands'):
        for command in self.data:
            attributes[command['name']] = command['state']
    elif (self.type == 'diskspace'):
        for data in self.data:
            attributes[data['path']] = '{:.2f}/{:.2f}{}    ({:.2f}%)'.format(to_unit(data['freeSpace'], self._unit), to_unit(data['totalSpace'], self._unit), self._unit, ((to_unit(data['freeSpace'], self._unit) / to_unit(data['totalSpace'], self._unit)) * 100))
    elif (self.type == 'movies'):
        for movie in self.data:
            attributes[to_key(movie)] = movie['downloaded']
    elif (self.type == 'status'):
        attributes = self.data
    return attributes
