Get the device ID when given a device name

        :param str device_name: device name
        :param list nodes: list of nodes from :py:meth:`generate_nodes`
        :return: device ID
        :rtype: int

def device_id_from_name(device_name, nodes):
        """
        Get the device ID when given a device name

        :param str device_name: device name
        :param list nodes: list of nodes from :py:meth:`generate_nodes`
        :return: device ID
        :rtype: int
        """
        device_id = None
        for node in nodes:
            if device_name == node['properties']['name']:
                device_id = node['id']
                break
        return device_id