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

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