def test_entity_ids():
    'Test entity ID validation.'
    schema = vol.Schema(cv.entity_ids)
    options = ('invalid_entity', 'sensor.light,sensor_invalid', ['invalid_entity'], ['sensor.light', 'sensor_invalid'], ['sensor.light,sensor_invalid'])
    for value in options:
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    options = ([], ['sensor.light'], 'sensor.light')
    for value in options:
        schema(value)
    assert (schema('sensor.LIGHT, light.kitchen ') == ['sensor.light', 'light.kitchen'])
Test entity ID validation.
def test_entity_ids():
    
    schema = vol.Schema(cv.entity_ids)
    options = ('invalid_entity', 'sensor.light,sensor_invalid', ['invalid_entity'], ['sensor.light', 'sensor_invalid'], ['sensor.light,sensor_invalid'])
    for value in options:
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    options = ([], ['sensor.light'], 'sensor.light')
    for value in options:
        schema(value)
    assert (schema('sensor.LIGHT, light.kitchen ') == ['sensor.light', 'light.kitchen'])