def test_entity_id():
    'Test entity ID validation.'
    schema = vol.Schema(cv.entity_id)
    with pytest.raises(vol.MultipleInvalid):
        schema('invalid_entity')
    assert (schema('sensor.LIGHT') == 'sensor.light')
Test entity ID validation.
def test_entity_id():
    
    schema = vol.Schema(cv.entity_id)
    with pytest.raises(vol.MultipleInvalid):
        schema('invalid_entity')
    assert (schema('sensor.LIGHT') == 'sensor.light')