def get_service(hass, config):
    from pushetta import Pushetta, exceptions

    if not validate_config({DOMAIN: config},
                           {DOMAIN: [CONF_API_KEY, 'channel_name']},
                           _LOGGER):
        return None

    try:
        pushetta = Pushetta(config[CONF_API_KEY])
        pushetta.pushMessage(config['channel_name'], "Home Assistant started")
    except exceptions.TokenValidationError:
        _LOGGER.error("Please check your access token")
        return None
    except exceptions.ChannelNotFoundError:
        _LOGGER.error("Channel '%s' not found", config['channel_name'])
        return None

    return PushettaNotificationService(config[CONF_API_KEY],
                                       config['channel_name'])


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