'Return device specific state attributes.'

@property
def device_state_attributes(self):

    node = self.gateway.sensors[self.node_id]
    child = node.children[self.child_id]
    attr = {ATTR_BATTERY_LEVEL: node.battery_level, ATTR_CHILD_ID: self.child_id, ATTR_DESCRIPTION: child.description, ATTR_DEVICE: self.gateway.device, ATTR_NODE_ID: self.node_id}
    set_req = self.gateway.const.SetReq
    for (value_type, value) in self._values.items():
        try:
            attr[set_req(value_type).name] = value
        except ValueError:
            _LOGGER.error('Value_type    %s    is    not    valid    for    mysensors    version    %s', value_type, self.gateway.protocol_version)
    return attr
