def test_entity_domain():
    'Test entity domain validation.'
    schema = vol.Schema(cv.entity_domain('sensor'))
    options = ('invalid_entity', 'cover.demo')
    for value in options:
        with pytest.raises(vol.MultipleInvalid):
            print(value)
            schema(value)
    assert (schema('sensor.LIGHT') == 'sensor.light')
Test entity domain validation.
def test_entity_domain():
    
    schema = vol.Schema(cv.entity_domain('sensor'))
    options = ('invalid_entity', 'cover.demo')
    for value in options:
        with pytest.raises(vol.MultipleInvalid):
            print(value)
            schema(value)
    assert (schema('sensor.LIGHT') == 'sensor.light')