def entity_id(value):
    value = string(value).lower()
    if valid_entity_id(value):
        return value
    raise vol.Invalid('Entity ID {} does not match format <domain>.<object_id>'
                      .format(value))
Validate Entity ID.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py/entity_id