def get_service(hass, config):
    if not validate_config({DOMAIN: config},
                           {DOMAIN: ['api_key', 'sender', 'recipient']},
                           _LOGGER):
        return None

    api_key = config['api_key']
    sender = config['sender']
    recipient = config['recipient']
    return SendgridNotificationService(api_key, sender, recipient)


# pylint: disable=too-few-public-methods
Get the SendGrid notification service.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/notify/sendgrid.py/get_service