'Retrieve groups of node.'

@ha.callback
def get(self, request, node_id):

    nodeid = int(node_id)
    hass = request.app['hass']
    values_list = hass.data[const.DATA_ENTITY_VALUES]
    values_data = {}
    for entity_values in values_list:
        if (entity_values.primary.node.node_id != nodeid):
            continue
        values_data[entity_values.primary.value_id] = {'label': entity_values.primary.label, 'index': entity_values.primary.index, 'instance': entity_values.primary.instance}
    return self.json(values_data)
